You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by gn...@apache.org on 2023/10/19 07:06:22 UTC

[maven] branch master updated: [MNG-6847] Use diamond operator (#1264)

This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/master by this push:
     new 889ceb42a4 [MNG-6847] Use diamond operator (#1264)
889ceb42a4 is described below

commit 889ceb42a429c0ed1a55d1d86edad63be7c1da5e
Author: Tim te Beek <ti...@gmail.com>
AuthorDate: Thu Oct 19 09:06:15 2023 +0200

    [MNG-6847] Use diamond operator (#1264)
    
    Co-authored-by: Moderne <te...@moderne.io>
---
 .../java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java | 2 +-
 .../src/main/java/org/eclipse/sisu/plexus/PlexusXmlBeanConverter.java | 2 +-
 maven-model/src/main/java/org/apache/maven/model/InputLocation.java   | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

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<ArtifactRepository>());
+        ResolutionGroup group = source.retrieve(m, localRepository(), new ArrayList<>());
         List<ArtifactRepository> 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<String, BeanProperty<Object>> propertyMap = new HashMap<String, BeanProperty<Object>>();
+        final Map<String, BeanProperty<Object>> propertyMap = new HashMap<>();
         for (final BeanProperty<Object> 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<Object, InputLocation>();
+                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<Object, InputLocation>();
+            locations = new java.util.LinkedHashMap<>();
             for (java.util.Iterator<Integer> it = indices.iterator(); it.hasNext(); ) {
                 InputLocation location;
                 Integer index = it.next();