diff --git a/aether-api/src/main/java/org/eclipse/aether/collection/UnsolvableVersionConflictException.java b/aether-api/src/main/java/org/eclipse/aether/collection/UnsolvableVersionConflictException.java index 8ca8221a50f4603d87f730b8438812f66742da9d..b4c6ea5981b225d26425285b84b551ac58c00dee 100644 --- a/aether-api/src/main/java/org/eclipse/aether/collection/UnsolvableVersionConflictException.java +++ b/aether-api/src/main/java/org/eclipse/aether/collection/UnsolvableVersionConflictException.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 Sonatype, Inc. + * Copyright (c) 2010, 2013 Sonatype, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -30,9 +30,9 @@ public class UnsolvableVersionConflictException private final transient Collection versions; - private final transient Collection> paths; + private final transient Collection> paths; - public UnsolvableVersionConflictException( Collection> paths ) + public UnsolvableVersionConflictException( Collection> paths ) { super( "Could not resolve version conflict among " + toPaths( paths ) ); if ( paths == null ) @@ -44,7 +44,7 @@ public class UnsolvableVersionConflictException { this.paths = paths; this.versions = new LinkedHashSet(); - for ( List path : paths ) + for ( List path : paths ) { VersionConstraint constraint = path.get( path.size() - 1 ).getVersionConstraint(); if ( constraint != null && constraint.getRange() != null ) @@ -55,7 +55,7 @@ public class UnsolvableVersionConflictException } } - private static String toPaths( Collection> paths ) + private static String toPaths( Collection> paths ) { String result = ""; @@ -63,7 +63,7 @@ public class UnsolvableVersionConflictException { Collection strings = new LinkedHashSet(); - for ( List path : paths ) + for ( List path : paths ) { strings.add( toPath( path ) ); } @@ -74,11 +74,11 @@ public class UnsolvableVersionConflictException return result; } - private static String toPath( List path ) + private static String toPath( List path ) { StringBuilder buffer = new StringBuilder( 256 ); - for ( Iterator it = path.iterator(); it.hasNext(); ) + for ( Iterator it = path.iterator(); it.hasNext(); ) { DependencyNode node = it.next(); if ( node.getDependency() == null ) @@ -110,7 +110,7 @@ public class UnsolvableVersionConflictException * * @return The (read-only) paths leading to the conflicting dependencies, never {@code null}. */ - public Collection> getPaths() + public Collection> getPaths() { return paths; } diff --git a/aether-api/src/main/java/org/eclipse/aether/graph/DefaultDependencyNode.java b/aether-api/src/main/java/org/eclipse/aether/graph/DefaultDependencyNode.java index e3be76f70e8050434b93a8d0bed03b6ed44c4dd4..ccecc73e7468bb3bf09165d30611182102f25299 100644 --- a/aether-api/src/main/java/org/eclipse/aether/graph/DefaultDependencyNode.java +++ b/aether-api/src/main/java/org/eclipse/aether/graph/DefaultDependencyNode.java @@ -35,9 +35,9 @@ public final class DefaultDependencyNode private Artifact artifact; - private List relocations; + private List relocations; - private Collection aliases; + private Collection aliases; private VersionConstraint versionConstraint; @@ -102,7 +102,7 @@ public final class DefaultDependencyNode setRepositories( node.getRepositories() ); setVersion( node.getVersion() ); setVersionConstraint( node.getVersionConstraint() ); - Map data = node.getData(); + Map data = node.getData(); setData( data.isEmpty() ? null : new HashMap( data ) ); } @@ -143,7 +143,7 @@ public final class DefaultDependencyNode this.artifact = dependency.getArtifact(); } - public List getRelocations() + public List getRelocations() { return relocations; } @@ -153,7 +153,7 @@ public final class DefaultDependencyNode * * @param relocations The sequence of relocations, may be {@code null}. */ - public void setRelocations( List relocations ) + public void setRelocations( List relocations ) { if ( relocations == null || relocations.isEmpty() ) { @@ -165,7 +165,7 @@ public final class DefaultDependencyNode } } - public Collection getAliases() + public Collection getAliases() { return aliases; } @@ -175,7 +175,7 @@ public final class DefaultDependencyNode * * @param aliases The known aliases, may be {@code null}. */ - public void setAliases( Collection aliases ) + public void setAliases( Collection aliases ) { if ( aliases == null || aliases.isEmpty() ) { diff --git a/aether-api/src/main/java/org/eclipse/aether/graph/DependencyNode.java b/aether-api/src/main/java/org/eclipse/aether/graph/DependencyNode.java index 867ec5000afd3706fb9861f3ff07802bc0df1ec0..4e345979f9104d09dbfb0602a6cdaa476af8b3f2 100644 --- a/aether-api/src/main/java/org/eclipse/aether/graph/DependencyNode.java +++ b/aether-api/src/main/java/org/eclipse/aether/graph/DependencyNode.java @@ -116,7 +116,7 @@ public interface DependencyNode * * @return The (read-only) sequence of relocations, never {@code null}. */ - List getRelocations(); + List getRelocations(); /** * Gets the known aliases for this dependency's artifact. An alias can be used to mark a patched rebuild of some @@ -125,7 +125,7 @@ public interface DependencyNode * * @return The (read-only) set of known aliases, never {@code null}. */ - Collection getAliases(); + Collection getAliases(); /** * Gets the version constraint that was parsed from the dependency's version declaration. @@ -194,7 +194,7 @@ public interface DependencyNode * * @return The (read-only) key-value mappings, never {@code null}. */ - Map getData(); + Map getData(); /** * Sets the custom data associated with this dependency node. diff --git a/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java b/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java index 4d56fd9aecd76b6acfdf4912c3a4b8d41f67293c..477bd31df8f9d3db0a2c42747099f28d0e774f42 100644 --- a/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java +++ b/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java @@ -174,7 +174,7 @@ public class DefaultDependencyCollector DefaultDependencyNode node = null; if ( root != null ) { - List versions; + List versions; VersionRangeResult rangeResult; try { @@ -405,7 +405,7 @@ public class DefaultDependencyCollector boolean traverse = !noDescriptor && depTraverser.traverseDependency( dependency ); - List versions; + List versions; VersionRangeResult rangeResult; try { @@ -638,8 +638,8 @@ public class DefaultDependencyCollector return repositories; } - private List filterVersions( Dependency dependency, VersionRangeResult rangeResult, - VersionFilter verFilter, DefaultVersionFilterContext verContext ) + private List filterVersions( Dependency dependency, VersionRangeResult rangeResult, + VersionFilter verFilter, DefaultVersionFilterContext verContext ) throws VersionRangeResolutionException { if ( rangeResult.getVersions().isEmpty() ) @@ -648,7 +648,7 @@ public class DefaultDependencyCollector + dependency.getArtifact() + " within specified range" ); } - List versions; + List versions; if ( verFilter != null && rangeResult.getVersionConstraint().getRange() != null ) { verContext.set( dependency, rangeResult ); diff --git a/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDeployer.java b/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDeployer.java index 60b1735be1a81e993326ec6a81b19457befe7cc3..6a1b6c1904de08b2e5c1e1c80e1c3601e2149776 100644 --- a/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDeployer.java +++ b/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDeployer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 Sonatype, Inc. + * Copyright (c) 2010, 2013 Sonatype, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -294,7 +294,7 @@ public class DefaultDeployer try { - List generators = getMetadataGenerators( session, request ); + List generators = getMetadataGenerators( session, request ); List artifactUploads = new ArrayList(); List metadataUploads = new ArrayList(); @@ -379,7 +379,8 @@ public class DefaultDeployer return result; } - private List getMetadataGenerators( RepositorySystemSession session, DeployRequest request ) + private List getMetadataGenerators( RepositorySystemSession session, + DeployRequest request ) { List factories = Utils.sortMetadataGeneratorFactories( this.metadataFactories ); diff --git a/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultInstaller.java b/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultInstaller.java index 81b521061297fc4643a3f0202f8279ac6311120b..d496bc07227455dfea82c4ece773bed589abe2b2 100644 --- a/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultInstaller.java +++ b/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultInstaller.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2011 Sonatype, Inc. + * Copyright (c) 2010, 2013 Sonatype, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -190,7 +190,7 @@ public class DefaultInstaller RequestTrace trace = RequestTrace.newChild( request.getTrace(), request ); - List generators = getMetadataGenerators( session, request ); + List generators = getMetadataGenerators( session, request ); List artifacts = new ArrayList( request.getArtifacts() ); @@ -245,7 +245,8 @@ public class DefaultInstaller return result; } - private List getMetadataGenerators( RepositorySystemSession session, InstallRequest request ) + private List getMetadataGenerators( RepositorySystemSession session, + InstallRequest request ) { List factories = Utils.sortMetadataGeneratorFactories( this.metadataFactories ); diff --git a/aether-impl/src/main/java/org/eclipse/aether/internal/impl/Utils.java b/aether-impl/src/main/java/org/eclipse/aether/internal/impl/Utils.java index d767eea076f845b54ff57e2ca57970fe110191e5..8d4e0760b4021d7d17d4ce26b81349756f1dff72 100644 --- a/aether-impl/src/main/java/org/eclipse/aether/internal/impl/Utils.java +++ b/aether-impl/src/main/java/org/eclipse/aether/internal/impl/Utils.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 Sonatype, Inc. + * Copyright (c) 2010, 2013 Sonatype, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -40,14 +40,15 @@ final class Utils }; - public static List sortMetadataGeneratorFactories( Collection factories ) + public static List sortMetadataGeneratorFactories( Collection factories ) { List result = new ArrayList( factories ); Collections.sort( result, COMPARATOR ); return result; } - public static List prepareMetadata( List generators, List artifacts ) + public static List prepareMetadata( List generators, + List artifacts ) { List metadatas = new ArrayList(); @@ -59,7 +60,8 @@ final class Utils return metadatas; } - public static List finishMetadata( List generators, List artifacts ) + public static List finishMetadata( List generators, + List artifacts ) { List metadatas = new ArrayList(); diff --git a/aether-util/src/main/java/org/eclipse/aether/util/graph/selector/AndDependencySelector.java b/aether-util/src/main/java/org/eclipse/aether/util/graph/selector/AndDependencySelector.java index a77d33b604862621e2fff2593147b47cdda52646..33d710adf606190c59530cecec23e4906ee60b63 100644 --- a/aether-util/src/main/java/org/eclipse/aether/util/graph/selector/AndDependencySelector.java +++ b/aether-util/src/main/java/org/eclipse/aether/util/graph/selector/AndDependencySelector.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.aether.util.graph.selector; +import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.LinkedHashSet; @@ -26,7 +27,7 @@ public final class AndDependencySelector implements DependencySelector { - private final Set selectors; + private final Set selectors; private int hashCode; @@ -39,8 +40,7 @@ public final class AndDependencySelector { if ( selectors != null && selectors.length > 0 ) { - this.selectors = new LinkedHashSet(); - Collections.addAll( this.selectors, selectors ); + this.selectors = new LinkedHashSet( Arrays.asList( selectors ) ); } else { @@ -53,7 +53,7 @@ public final class AndDependencySelector * * @param selectors The selectors to combine, may be {@code null}. */ - public AndDependencySelector( Collection selectors ) + public AndDependencySelector( Collection selectors ) { if ( selectors != null && !selectors.isEmpty() ) { diff --git a/aether-util/src/main/java/org/eclipse/aether/util/listener/ChainedRepositoryListener.java b/aether-util/src/main/java/org/eclipse/aether/util/listener/ChainedRepositoryListener.java index 7dbade7e550624bbd068aa526fe6fa1cae000407..15b0503344100537e34000b73d1db923316bb0b0 100644 --- a/aether-util/src/main/java/org/eclipse/aether/util/listener/ChainedRepositoryListener.java +++ b/aether-util/src/main/java/org/eclipse/aether/util/listener/ChainedRepositoryListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2011 Sonatype, Inc. + * Copyright (c) 2010, 2013 Sonatype, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -69,7 +69,7 @@ public final class ChainedRepositoryListener * * @param listeners The listeners to delegate to, may be {@code null} or empty. */ - public ChainedRepositoryListener( Collection listeners ) + public ChainedRepositoryListener( Collection listeners ) { add( listeners ); } @@ -79,7 +79,7 @@ public final class ChainedRepositoryListener * * @param listeners The listeners to add, may be {@code null} or empty. */ - public void add( Collection listeners ) + public void add( Collection listeners ) { if ( listeners != null ) { diff --git a/aether-util/src/main/java/org/eclipse/aether/util/listener/ChainedTransferListener.java b/aether-util/src/main/java/org/eclipse/aether/util/listener/ChainedTransferListener.java index d08a9e54c73775618f6179066fd12bbc78a3a331..e9d8df650ea3cb9745cf7a582b3179a29ae057e3 100644 --- a/aether-util/src/main/java/org/eclipse/aether/util/listener/ChainedTransferListener.java +++ b/aether-util/src/main/java/org/eclipse/aether/util/listener/ChainedTransferListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2011 Sonatype, Inc. + * Copyright (c) 2010, 2013 Sonatype, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -70,7 +70,7 @@ public final class ChainedTransferListener * * @param listeners The listeners to delegate to, may be {@code null} or empty. */ - public ChainedTransferListener( Collection listeners ) + public ChainedTransferListener( Collection listeners ) { add( listeners ); } @@ -80,7 +80,7 @@ public final class ChainedTransferListener * * @param listeners The listeners to add, may be {@code null} or empty. */ - public void add( Collection listeners ) + public void add( Collection listeners ) { if ( listeners != null ) { diff --git a/aether-util/src/main/java/org/eclipse/aether/util/repository/ChainedAuthentication.java b/aether-util/src/main/java/org/eclipse/aether/util/repository/ChainedAuthentication.java index ec7c694f08ebe78975b48f20db9c5571aafe9c14..96968a0e7af2353e5b2039ba0f9870290445159b 100644 --- a/aether-util/src/main/java/org/eclipse/aether/util/repository/ChainedAuthentication.java +++ b/aether-util/src/main/java/org/eclipse/aether/util/repository/ChainedAuthentication.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Sonatype, Inc. + * Copyright (c) 2012, 2013 Sonatype, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -40,7 +40,7 @@ final class ChainedAuthentication } } - public ChainedAuthentication( Collection authentications ) + public ChainedAuthentication( Collection authentications ) { if ( authentications != null && !authentications.isEmpty() ) {