summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorKevin Sawicki2011-03-25 13:05:32 (EDT)
committer Kevin Sawicki2011-03-25 13:05:32 (EDT)
commit6c304386d84e509634acd7323e367dc0555168a1 (patch)
tree76e1438bf2b10bcdeed820c2bf667975d94b39db
parentfb3788bd01e613af59e62293e0eb364a5caa01b0 (diff)
downloadegit-6c304386d84e509634acd7323e367dc0555168a1.zip
egit-6c304386d84e509634acd7323e367dc0555168a1.tar.gz
egit-6c304386d84e509634acd7323e367dc0555168a1.tar.bz2
Use myObject field during equals comparisons for error nodesrefs/changes/19/2919/3
Parent and type are already compared so error nodes can just compare on myObject fields since that is the exception message string. This fixes a class cast exception where myObject was cast to a repository when it was a string. Change-Id: Iee81eb2b79bd5418a4e649808c969dc95cc85a83 Signed-off-by: Kevin Sawicki <kevin@github.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoryTreeNode.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoryTreeNode.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoryTreeNode.java
index 4a81e71..d917c9b 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoryTreeNode.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoryTreeNode.java
@@ -299,8 +299,6 @@ public abstract class RepositoryTreeNode<T> implements Comparable<RepositoryTree
// fall through
case ADDITIONALREFS:
// fall through
- case ERROR:
- // fall through TODO fix this: Repository may be null
case WORKINGDIR:
return ((Repository) myObject).getDirectory().equals(
((Repository) otherObject).getDirectory());
@@ -316,6 +314,8 @@ public abstract class RepositoryTreeNode<T> implements Comparable<RepositoryTree
case FILE:
return ((File) myObject).getPath().equals(
((File) otherObject).getPath());
+ case ERROR:
+ // fall through
case REMOTE:
// fall through
case FETCH: