Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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