summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpschonbac2008-03-25 17:23:38 (EDT)
committer pschonbac2008-03-25 17:23:38 (EDT)
commitc86093c8eb986888ddc87d9e191c9a8fdea3a01e (patch)
tree6edddb41ccb47bedcbea89ee0f599e6278c8f499
parent9686f1a4462775ed8d05487b33ca7731ad5e308a (diff)
downloadorg.eclipse.xpand-c86093c8eb986888ddc87d9e191c9a8fdea3a01e.zip
org.eclipse.xpand-c86093c8eb986888ddc87d9e191c9a8fdea3a01e.tar.gz
org.eclipse.xpand-c86093c8eb986888ddc87d9e191c9a8fdea3a01e.tar.bz2
NEW - bug 223546: [Expressions] Allow null values as operation parameters
https://bugs.eclipse.org/bugs/show_bug.cgi?id=223546 Patch proposal by Manfred Klug adapted to 5.0
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/typesystem/AbstractTypeImpl.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/org.eclipse.xtend/src/org/eclipse/xtend/typesystem/AbstractTypeImpl.java b/plugins/org.eclipse.xtend/src/org/eclipse/xtend/typesystem/AbstractTypeImpl.java
index 643ecb2..709bc3c 100644
--- a/plugins/org.eclipse.xtend/src/org/eclipse/xtend/typesystem/AbstractTypeImpl.java
+++ b/plugins/org.eclipse.xtend/src/org/eclipse/xtend/typesystem/AbstractTypeImpl.java
@@ -172,6 +172,9 @@ public abstract class AbstractTypeImpl implements Type {
}
public Object convert(final Object src, final Class<?> targetType) {
+ if (src == null)
+ return null;
+
if (targetType.isInstance(src))
return src;
else