Copilot commented on code in PR #1653:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/1653#discussion_r3537292013


##########
src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java:
##########
@@ -547,7 +547,7 @@ private void writeScriptableOutput(Set<Artifact> artifacts) 
{
                         .append(":")
                         .append(artifact.getDependencyConflictId())
                         .append(":")
-                        .append(artifact.getClassifier())
+                        .append(artifact.getClassifier() != null ? 
artifact.getClassifier() : "")

Review Comment:
   `artifact.getClassifier()` is invoked twice inside the ternary, which is 
unnecessary and slightly reduces readability. Capture the classifier once per 
artifact and append that value (coercing null to empty) to keep the output 
stable and the code clearer.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to