Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-02-05 19:29:35 +0000
committerMichael Valenta2003-02-05 19:29:35 +0000
commit25623541b2ba16a568bba20dfe90d8d5926e3e3d (patch)
tree3b4d76c20a48198dfd29fc63b2d9e7e3ee9a03ca
parent03d9c8908c8f9f2c0df5267d00dcc99b2eaf254d (diff)
downloadeclipse.platform.team-25623541b2ba16a568bba20dfe90d8d5926e3e3d.tar.gz
eclipse.platform.team-25623541b2ba16a568bba20dfe90d8d5926e3e3d.tar.xz
eclipse.platform.team-25623541b2ba16a568bba20dfe90d8d5926e3e3d.zip
30985: NPE expanding HEAD in repository viewRoot_PR29944-decoratorPerformanceI20030205a
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositorySorter.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositorySorter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositorySorter.java
index 8522eff2c..6a98f4c6c 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositorySorter.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositorySorter.java
@@ -67,7 +67,7 @@ public class RepositorySorter extends ViewerSorter {
ICVSRemoteFolder f1 = (ICVSRemoteFolder)o1;
ICVSRemoteFolder f2 = (ICVSRemoteFolder)o2;
if (f1.getName().equals(f2.getName())) {
- return f2.getTag().compareTo(f1.getTag());
+ return compare(f1, f2);
}
}
@@ -77,5 +77,16 @@ public class RepositorySorter extends ViewerSorter {
return super.compare(viewer, o1, o2);
}
+
+ /*
+ * Compare to remote folders whose names are the same.
+ */
+ private int compare(ICVSRemoteFolder f1, ICVSRemoteFolder f2) {
+ CVSTag tag1 = f1.getTag();
+ CVSTag tag2 = f2.getTag();
+ if (tag1 == null) return 1;
+ if (tag2 == null) return -1;
+ return tag2.compareTo(tag1);
+ }
}

Back to the top