Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class AntModelResolver
this.repoSys = repoSys;
this.remoteRepositoryManager = remoteRepositoryManager;
this.repositories = repositories;
this.repositoryIds = new HashSet<String>();
this.repositoryIds = new HashSet<>();
}

private AntModelResolver( final AntModelResolver original )
Expand All @@ -82,7 +82,7 @@ private AntModelResolver( final AntModelResolver original )
this.repoSys = original.repoSys;
this.remoteRepositoryManager = original.remoteRepositoryManager;
this.repositories = original.repositories;
this.repositoryIds = new HashSet<String>( original.repositoryIds );
this.repositoryIds = new HashSet<>( original.repositoryIds );
}

public void addRepository( final Repository repository )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private static Collection<org.eclipse.aether.graph.Exclusion> toExclusions( Coll
Collection<Exclusion> exclusions2 )
{
Collection<org.eclipse.aether.graph.Exclusion> results =
new LinkedHashSet<org.eclipse.aether.graph.Exclusion>();
new LinkedHashSet<>();
if ( exclusions1 != null )
{
for ( Exclusion exclusion : exclusions1 )
Expand Down Expand Up @@ -202,11 +202,11 @@ public static List<org.eclipse.aether.repository.RemoteRepository> toRepositorie
}
else
{
repositories = new ArrayList<RemoteRepository>();
repositories = new ArrayList<>();
}

List<org.eclipse.aether.repository.RemoteRepository> results =
new ArrayList<org.eclipse.aether.repository.RemoteRepository>();
new ArrayList<>();
for ( RemoteRepository repo : repositories )
{
results.add( toRepository( repo ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class ProjectWorkspaceReader

private static final Object LOCK = new Object();

private Map<String, Artifact> artifacts = new ConcurrentHashMap<String, Artifact>();
private Map<String, Artifact> artifacts = new ConcurrentHashMap<>();

public void addPom( Pom pom )
{
Expand Down Expand Up @@ -107,7 +107,7 @@ public File findArtifact( Artifact artifact )

public List<String> findVersions( Artifact artifact )
{
List<String> versions = new ArrayList<String>();
List<String> versions = new ArrayList<>();
for ( Artifact art : artifacts.values() )
{
if ( ArtifactIdUtils.equalsVersionlessId( artifact, art ) )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static List<org.apache.maven.model.Profile> convert( List<Profile> profil
return null;
}

List<org.apache.maven.model.Profile> results = new ArrayList<org.apache.maven.model.Profile>();
List<org.apache.maven.model.Profile> results = new ArrayList<>();

for ( Profile profile : profiles )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected void validate()
{
getArtifacts().validate( this );

final Map<String, File> duplicates = new HashMap<String, File>();
final Map<String, File> duplicates = new HashMap<>();
for ( final Artifact artifact : getArtifacts().getArtifacts() )
{
final String key = artifact.getType() + ':' + artifact.getClassifier();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ class Layout
Layout( String layout )
throws BuildException
{
Collection<String> valid = new HashSet<String>( Arrays.asList( GID, GID_DIRS, AID, VER, BVER, EXT, CLS ) );
List<String> tokens = new ArrayList<String>();
Collection<String> valid = new HashSet<>( Arrays.asList( GID, GID_DIRS, AID, VER, BVER, EXT, CLS ) );
List<String> tokens = new ArrayList<>();
Matcher m = Pattern.compile( "(\\{[^}]*\\})|([^{]+)" ).matcher( layout );
while ( m.find() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class Resolve
extends AbstractResolvingTask
{

private List<ArtifactConsumer> consumers = new ArrayList<ArtifactConsumer>();
private List<ArtifactConsumer> consumers = new ArrayList<>();

private boolean failOnMissingAttachments;

Expand Down Expand Up @@ -132,7 +132,7 @@ public void execute()
DependencyNode root = collectDependencies().getRoot();
root.accept( new DependencyGraphLogger( this ) );

Map<String, Group> groups = new HashMap<String, Group>();
Map<String, Group> groups = new HashMap<>();
for ( ArtifactConsumer consumer : consumers )
{
String classifier = consumer.getClassifier();
Expand Down Expand Up @@ -215,8 +215,8 @@ public void setScopes( String scopes )
throw new BuildException( "You must not specify both 'scopes' and 'classpath'" );
}

Collection<String> included = new HashSet<String>();
Collection<String> excluded = new HashSet<String>();
Collection<String> included = new HashSet<>();
Collection<String> excluded = new HashSet<>();

String[] split = scopes.split( "[, ]" );
for ( String scope : split )
Expand Down Expand Up @@ -504,9 +504,9 @@ private static class Group

private String classifier;

private List<ArtifactConsumer> consumers = new ArrayList<ArtifactConsumer>();
private List<ArtifactConsumer> consumers = new ArrayList<>();

private List<ArtifactRequest> requests = new ArrayList<ArtifactRequest>();
private List<ArtifactRequest> requests = new ArrayList<>();

Group( String classifier )
{
Expand All @@ -525,7 +525,7 @@ public void add( ArtifactConsumer consumer )

public void createRequests( DependencyNode node )
{
createRequests( node, new LinkedList<DependencyNode>() );
createRequests( node, new LinkedList<>() );
}

private void createRequests( DependencyNode node, LinkedList<DependencyNode> parents )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class Artifacts
implements ArtifactContainer
{

private List<ArtifactContainer> containers = new ArrayList<ArtifactContainer>();
private List<ArtifactContainer> containers = new ArrayList<>();

protected Artifacts getRef()
{
Expand Down Expand Up @@ -86,7 +86,7 @@ public List<Artifact> getArtifacts()
{
return getRef().getArtifacts();
}
List<Artifact> artifacts = new ArrayList<Artifact>();
List<Artifact> artifacts = new ArrayList<>();
for ( ArtifactContainer container : containers )
{
artifacts.addAll( container.getArtifacts() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class Authentication

private String passphrase;

private List<String> servers = new ArrayList<String>();
private List<String> servers = new ArrayList<>();

@Override
public void setProject( Project project )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ public class Dependencies

private Pom pom;

private List<DependencyContainer> containers = new ArrayList<DependencyContainer>();
private List<DependencyContainer> containers = new ArrayList<>();

private List<Exclusion> exclusions = new ArrayList<Exclusion>();
private List<Exclusion> exclusions = new ArrayList<>();

private boolean nestedDependencies;

Expand All @@ -64,7 +64,7 @@ public void validate( Task task )
{
throw new BuildException( "A <pom> used for dependency resolution has to be backed by a pom.xml file" );
}
Map<String, String> ids = new HashMap<String, String>();
Map<String, String> ids = new HashMap<>();
for ( DependencyContainer container : containers )
{
container.validate( task );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class Dependency

private File systemPath;

private List<Exclusion> exclusions = new ArrayList<Exclusion>();
private List<Exclusion> exclusions = new ArrayList<>();

protected Dependency getRef()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class RemoteRepositories
implements RemoteRepositoryContainer
{

private List<RemoteRepositoryContainer> containers = new ArrayList<RemoteRepositoryContainer>();
private List<RemoteRepositoryContainer> containers = new ArrayList<>();

protected RemoteRepositories getRef()
{
Expand Down Expand Up @@ -86,7 +86,7 @@ public List<RemoteRepository> getRepositories()
{
return getRef().getRepositories();
}
List<RemoteRepository> repos = new ArrayList<RemoteRepository>();
List<RemoteRepository> repos = new ArrayList<>();
for ( RemoteRepositoryContainer container : containers )
{
repos.addAll( container.getRepositories() );
Expand Down