fix sort order (IDEA-80250)
authorAnna Kozlova <anna.kozlova@jetbrains.com>
Tue, 24 Jan 2012 13:28:14 +0000 (17:28 +0400)
committerAnna Kozlova <anna.kozlova@jetbrains.com>
Tue, 24 Jan 2012 16:35:34 +0000 (20:35 +0400)
platform/platform-impl/src/com/intellij/ide/plugins/PluginManagerColumnInfo.java

index 3f2c2566c9cfc0f236c955a8c33939a3d351e0c6..a8e930bfadcf3795e9812ffb70c329d79fdf1c2b 100644 (file)
@@ -189,7 +189,7 @@ class PluginManagerColumnInfo extends ColumnInfo<IdeaPluginDescriptor, String> {
           String count1 = o1.getDownloads();
           String count2 = o2.getDownloads();
           if (count1 != null && count2 != null) {
-            return -Long.valueOf(count1).compareTo(Long.valueOf(count2));
+            return Long.valueOf(count1).compareTo(Long.valueOf(count2));
           }
           else if (count1 != null) {
             return -1;
@@ -206,9 +206,9 @@ class PluginManagerColumnInfo extends ColumnInfo<IdeaPluginDescriptor, String> {
           long date1 = (o1 instanceof PluginNode) ? ((PluginNode)o1).getDate() : ((IdeaPluginDescriptorImpl)o1).getDate();
           long date2 = (o2 instanceof PluginNode) ? ((PluginNode)o2).getDate() : ((IdeaPluginDescriptorImpl)o2).getDate();
           if (date1 < date2) {
-            return 1;
+            return -1;
           }
-          else if (date1 > date2) return -1;
+          else if (date1 > date2) return 1;
           return 0;
         }
       };