Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikaël Barbero2014-08-13 10:07:32 -0400
committerMikaël Barbero2014-08-13 10:07:32 -0400
commit7ffdb4cbfa17c8b359b82ffd90297efa92264f62 (patch)
tree86c0c3cd70986d21d4449823bf118609a3f303e2 /plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse
parent30312850b57033ab31ab16f4b37ec115af51a4cc (diff)
downloadorg.eclipse.emf.compare-7ffdb4cbfa17c8b359b82ffd90297efa92264f62.tar.gz
org.eclipse.emf.compare-7ffdb4cbfa17c8b359b82ffd90297efa92264f62.tar.xz
org.eclipse.emf.compare-7ffdb4cbfa17c8b359b82ffd90297efa92264f62.zip
Do not use == to compare primitive types wrapper object
Diffstat (limited to 'plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse')
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/unit/AbstractCompareTest.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/unit/AbstractCompareTest.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/unit/AbstractCompareTest.java
index 4fcd2674b..7b09ece00 100644
--- a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/unit/AbstractCompareTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/unit/AbstractCompareTest.java
@@ -206,21 +206,22 @@ public class AbstractCompareTest {
protected Object getValueDistinctFromDefault(EStructuralFeature feature) {
final Object defaultValue = feature.getDefaultValue();
if (feature.getEType() == EcorePackage.Literals.EBOOLEAN_OBJECT) {
- return defaultValue == Boolean.TRUE ? Boolean.FALSE : Boolean.TRUE;
+ return defaultValue.equals(Boolean.TRUE) ? Boolean.FALSE : Boolean.TRUE;
} else if (feature.getEType() == EcorePackage.Literals.EINTEGER_OBJECT) {
- return defaultValue == Integer.valueOf(0) ? Integer.valueOf(-1) : Integer.valueOf(0);
+ return defaultValue.equals(Integer.valueOf(0)) ? Integer.valueOf(-1) : Integer.valueOf(0);
} else if (feature.getEType() == EcorePackage.Literals.EBYTE_OBJECT) {
- return defaultValue == Byte.valueOf("0") ? Byte.valueOf("-1") : Byte.valueOf("0");
+ return defaultValue.equals(Byte.valueOf("0")) ? Byte.valueOf("-1") : Byte.valueOf("0");
} else if (feature.getEType() == EcorePackage.Literals.ECHARACTER_OBJECT) {
- return defaultValue == Character.valueOf('a') ? Character.valueOf('b') : Character.valueOf('a');
+ return defaultValue.equals(Character.valueOf('a')) ? Character.valueOf('b') : Character
+ .valueOf('a');
} else if (feature.getEType() == EcorePackage.Literals.EDOUBLE_OBJECT) {
- return defaultValue == Double.valueOf(0) ? Double.valueOf(-1) : Double.valueOf(0);
+ return defaultValue.equals(Double.valueOf(0)) ? Double.valueOf(-1) : Double.valueOf(0);
} else if (feature.getEType() == EcorePackage.Literals.EFLOAT_OBJECT) {
- return defaultValue == Float.valueOf(0) ? Float.valueOf(-1) : Float.valueOf(0);
+ return defaultValue.equals(Float.valueOf(0)) ? Float.valueOf(-1) : Float.valueOf(0);
} else if (feature.getEType() == EcorePackage.Literals.ELONG_OBJECT) {
- return defaultValue == Long.valueOf(0) ? Long.valueOf(-1) : Long.valueOf(0);
+ return defaultValue.equals(Long.valueOf(0)) ? Long.valueOf(-1) : Long.valueOf(0);
} else if (feature.getEType() == EcorePackage.Literals.ESHORT_OBJECT) {
- return defaultValue == Short.valueOf((short)0) ? Short.valueOf((short)-1) : Short
+ return defaultValue.equals(Short.valueOf((short)0)) ? Short.valueOf((short)-1) : Short
.valueOf((short)0);
} else if (feature.getEType() == EcorePackage.Literals.ESTRING) {
return "".equals(defaultValue) ? "notdefault" : "";

Back to the top