diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java index 897862f8bc..2b8bc61431 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java @@ -176,7 +176,7 @@ class ArtifactResolverTest extends AbstractArtifactComponentTestCase { public void testReadRepoFromModel() throws Exception { Artifact m = createArtifact(TestMavenWorkspaceReader.ARTIFACT_ID, TestMavenWorkspaceReader.VERSION); ArtifactMetadataSource source = getContainer().lookup(ArtifactMetadataSource.class, "maven"); - ResolutionGroup group = source.retrieve(m, localRepository(), new ArrayList()); + ResolutionGroup group = source.retrieve(m, localRepository(), new ArrayList<>()); List repositories = group.getResolutionRepositories(); assertEquals(1, repositories.size(), "There should be one repository!"); ArtifactRepository repository = repositories.get(0); diff --git a/maven-embedder/src/main/java/org/eclipse/sisu/plexus/PlexusXmlBeanConverter.java b/maven-embedder/src/main/java/org/eclipse/sisu/plexus/PlexusXmlBeanConverter.java index 709f0d0662..7ed8d31ca9 100644 --- a/maven-embedder/src/main/java/org/eclipse/sisu/plexus/PlexusXmlBeanConverter.java +++ b/maven-embedder/src/main/java/org/eclipse/sisu/plexus/PlexusXmlBeanConverter.java @@ -240,7 +240,7 @@ public final class PlexusXmlBeanConverter implements PlexusBeanConverter { final Object bean = newImplementation(clazz); // build map of all known bean properties belonging to the chosen implementation - final Map> propertyMap = new HashMap>(); + final Map> propertyMap = new HashMap<>(); for (final BeanProperty property : new BeanProperties(clazz)) { final String name = property.getName(); if (!propertyMap.containsKey(name)) { diff --git a/maven-model/src/main/java/org/apache/maven/model/InputLocation.java b/maven-model/src/main/java/org/apache/maven/model/InputLocation.java index a9b1a64d51..1b48e0463e 100644 --- a/maven-model/src/main/java/org/apache/maven/model/InputLocation.java +++ b/maven-model/src/main/java/org/apache/maven/model/InputLocation.java @@ -192,7 +192,7 @@ public final class InputLocation implements java.io.Serializable, Cloneable, Inp public void setOtherLocation(Object key, InputLocation location) { if (location != null) { if (this.locations == null) { - this.locations = new java.util.LinkedHashMap(); + this.locations = new java.util.LinkedHashMap<>(); } this.locations.put(key, location); } @@ -277,7 +277,7 @@ public final class InputLocation implements java.io.Serializable, Cloneable, Inp } else if (targetLocations == null) { locations = sourceLocations; } else { - locations = new java.util.LinkedHashMap(); + locations = new java.util.LinkedHashMap<>(); for (java.util.Iterator it = indices.iterator(); it.hasNext(); ) { InputLocation location; Integer index = it.next();