/** * Sets the exclusions for the dependency. * * @param exclusions The exclusions, may be {@code null}. * @return The new dependency, never {@code null}. */ public Dependency setExclusions( Collection<Exclusion> exclusions ) { if ( hasEquivalentExclusions( exclusions ) ) { return this; } return new Dependency( artifact, scope, optional, exclusions ); }
/** * Sets the exclusions for the dependency. * * @param exclusions The exclusions, may be {@code null}. * @return The new dependency, never {@code null}. */ public Dependency setExclusions( Collection<Exclusion> exclusions ) { if ( hasEquivalentExclusions( exclusions ) ) { return this; } return new Dependency( artifact, scope, optional, exclusions ); }