You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "elharo (via GitHub)" <gi...@apache.org> on 2025/03/26 11:39:49 UTC

[PR] Remove redundant code [maven]

elharo opened a new pull request, #2188:
URL: https://github.com/apache/maven/pull/2188

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Remove redundant code [maven]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on PR #2188:
URL: https://github.com/apache/maven/pull/2188#issuecomment-2755088874

   I had to look twice at that one too. Vertices is a set. Adding the same
   thing twice is a noop.
   
   Elliotte Rusty Harold
   ***@***.***
   
   
   On Wed, Mar 26, 2025 at 12:43 PM Guillaume Nodet ***@***.***>
   wrote:
   
   > ***@***.**** commented on this pull request.
   > ------------------------------
   >
   > In
   > compat/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java
   > <https://github.com/apache/maven/pull/2188#discussion_r2014586394>:
   >
   > > @@ -128,9 +128,7 @@ private void processTreeNodes(MetadataGraphVertex parentVertex, MetadataTreeNode
   >          }
   >
   >          MetadataGraphVertex vertex = new MetadataGraphVertex(node.md, versionedVertices, scopedVertices);
   > -        if (!vertices.contains(vertex)) {
   > -            vertices.add(vertex);
   > -        }
   > +        vertices.add(vertex);
   >
   > THat's a non trivial change, is this semantic change on purpose ?
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/maven/pull/2188#pullrequestreview-2717939695>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AAHVP2HGNXK4IEEFV6AN7H32WLDJVAVCNFSM6AAAAABZ2CARYOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDOMJXHEZTSNRZGU>
   > .
   > You are receiving this because you authored the thread.Message ID:
   > ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Remove redundant code [maven]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on code in PR #2188:
URL: https://github.com/apache/maven/pull/2188#discussion_r2014586394


##########
compat/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java:
##########
@@ -128,9 +128,7 @@ private void processTreeNodes(MetadataGraphVertex parentVertex, MetadataTreeNode
         }
 
         MetadataGraphVertex vertex = new MetadataGraphVertex(node.md, versionedVertices, scopedVertices);
-        if (!vertices.contains(vertex)) {
-            vertices.add(vertex);
-        }
+        vertices.add(vertex);

Review Comment:
   THat's a non trivial change, is this semantic change on purpose ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Remove redundant code [maven]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo merged PR #2188:
URL: https://github.com/apache/maven/pull/2188


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org