Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-08-25 10:31:42 +0000
committerEike Stepper2011-08-25 10:31:42 +0000
commit324f0dec32ce3040103832c7aaef99835d986883 (patch)
treeafaed8e191bed762a978e2507d82ebe5b834dc08
parent32bfd35dbf8887e8cd25f70c7f36f5e75eff68f3 (diff)
downloadcdo-324f0dec32ce3040103832c7aaef99835d986883.tar.gz
cdo-324f0dec32ce3040103832c7aaef99835d986883.tar.xz
cdo-324f0dec32ce3040103832c7aaef99835d986883.zip
fix type checks
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/properties/Property.java45
1 files changed, 43 insertions, 2 deletions
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/properties/Property.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/properties/Property.java
index 2c8c660dfe..b255c9cdf8 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/properties/Property.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/properties/Property.java
@@ -75,12 +75,53 @@ public abstract class Property<RECEIVER>
public final Object getValue(RECEIVER receiver)
{
Object value = eval(receiver);
- if (value == null || value.getClass().isPrimitive())
+ if (value == null)
{
return value;
}
- if (value.getClass().isPrimitive())
+ Class<? extends Object> c = value.getClass();
+ if (c == Boolean.class)
+ {
+ return value;
+ }
+
+ if (c == Boolean.class)
+ {
+ return value;
+ }
+
+ if (c == Character.class)
+ {
+ return value;
+ }
+
+ if (c == Byte.class)
+ {
+ return value;
+ }
+
+ if (c == Short.class)
+ {
+ return value;
+ }
+
+ if (c == Integer.class)
+ {
+ return value;
+ }
+
+ if (c == Long.class)
+ {
+ return value;
+ }
+
+ if (c == Float.class)
+ {
+ return value;
+ }
+
+ if (c == Double.class)
{
return value;
}

Back to the top