summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2009-01-08 11:23:22 (EST)
committerCarsten Drossel2009-01-08 11:23:22 (EST)
commit86b32d0fdf5701122d00635cbb8682258a51e9a7 (patch)
treea9c227d0544479f688cc5b86d70e663fce753de8
parentff6fc8b93d9adc33c4fc42e9489b943c70b7c137 (diff)
downloadorg.eclipse.riena-86b32d0fdf5701122d00635cbb8682258a51e9a7.zip
org.eclipse.riena-86b32d0fdf5701122d00635cbb8682258a51e9a7.tar.gz
org.eclipse.riena-86b32d0fdf5701122d00635cbb8682258a51e9a7.tar.bz2
fixed findbugs warning by implementing a 'more usual' equals method
-rw-r--r--org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/uiprocess/ProgressInfoDataObject.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/uiprocess/ProgressInfoDataObject.java b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/uiprocess/ProgressInfoDataObject.java
index 50c374b..f140c79 100644
--- a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/uiprocess/ProgressInfoDataObject.java
+++ b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/uiprocess/ProgressInfoDataObject.java
@@ -68,10 +68,13 @@ public class ProgressInfoDataObject implements Comparable<ProgressInfoDataObject
@Override
public boolean equals(Object obj) {
- if (obj == null || !ProgressInfoDataObject.class.isAssignableFrom(obj.getClass())) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
return false;
}
- ProgressInfoDataObject other = ProgressInfoDataObject.class.cast(obj);
+ ProgressInfoDataObject other = (ProgressInfoDataObject) obj;
return key == other.key;
}