Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jpa
diff options
context:
space:
mode:
authorbvosburgh2007-05-09 16:14:43 +0000
committerbvosburgh2007-05-09 16:14:43 +0000
commit577600fc6fe8d54e27b96851272c561fe4f46b04 (patch)
treebbdd2ac32502cd982951a6c20421b93bf95d79fe /jpa
parentd4bed7e76ccca76bdee99a8d28c34969bced9e0a (diff)
downloadwebtools.dali-577600fc6fe8d54e27b96851272c561fe4f46b04.tar.gz
webtools.dali-577600fc6fe8d54e27b96851272c561fe4f46b04.tar.xz
webtools.dali-577600fc6fe8d54e27b96851272c561fe4f46b04.zip
minor refactor
Diffstat (limited to 'jpa')
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jdtutility/ShortCircuitAnnotationElementAdapter.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jdtutility/ShortCircuitAnnotationElementAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jdtutility/ShortCircuitAnnotationElementAdapter.java
index ce763d7430..b9375e846f 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jdtutility/ShortCircuitAnnotationElementAdapter.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jdtutility/ShortCircuitAnnotationElementAdapter.java
@@ -90,7 +90,7 @@ public class ShortCircuitAnnotationElementAdapter
if (newValue == null) { // object => null
this.adapter.setValue(newValue);
} else { // object => object
- if (newValue.equals(oldValue)) {
+ if (this.valuesAreEqual(oldValue, newValue)) {
// do nothing
} else {
this.adapter.setValue(newValue);
@@ -99,4 +99,11 @@ public class ShortCircuitAnnotationElementAdapter
}
}
+ /**
+ * both values are non-null when this method is called
+ */
+ protected boolean valuesAreEqual(Object oldValue, Object newValue) {
+ return newValue.equals(oldValue);
+ }
+
}

Back to the top