fix compareTo implementation, external system data key can be used as a key in a...
authorVladislav.Soroka <Vladislav.Soroka@jetbrains.com>
Fri, 7 Aug 2015 09:58:21 +0000 (12:58 +0300)
committerVladislav.Soroka <Vladislav.Soroka@jetbrains.com>
Fri, 7 Aug 2015 10:00:26 +0000 (13:00 +0300)
platform/external-system-api/src/com/intellij/openapi/externalSystem/model/Key.java

index 32f76849c68dfc6e4821d83c0c0efe04963ab917..eb7f2e5222f32800ab155504b0ca548e26c5b16f 100644 (file)
@@ -95,6 +95,7 @@ public class Key<T> implements Serializable, Comparable<Key<?>> {
 
   @Override
   public int compareTo(@NotNull Key<?> that) {
+    if(myProcessingWeight == that.myProcessingWeight) return myDataClass.compareTo(that.myDataClass);
     return myProcessingWeight - that.myProcessingWeight;
   }