gnodet commented on code in PR #2428:
URL: https://github.com/apache/maven/pull/2428#discussion_r2125769798


##########
impl/maven-di/src/main/java/org/apache/maven/di/impl/Binding.java:
##########
@@ -128,14 +128,19 @@ public Annotation getScope() {
         return scope;
     }
 
-    public String getDisplayString() {
+    public String getDisplayString() { // fixme unused
         return 
dependencies.stream().map(Dependency::getDisplayString).collect(joining(", ", 
"[", "]"));
     }
 
     public Key<?> getOriginalKey() {
         return originalKey;
     }
 
+    @Override
+    public int compareTo(Binding<?> objectBinding) {
+        return Integer.compare(this.priority, objectBinding.priority);

Review Comment:
   Reverse the logic, bindings are always sorted in descending order to get the 
ones with highest priority first.



-- 
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-unsubscr...@maven.apache.org

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

Reply via email to