summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Uhl2012-05-04 09:22:14 (EDT)
committer Ed.Willink2012-05-04 10:47:29 (EDT)
commit3a3c2d69f0385e27e47fb2e1cff8fa0c6b0f552a (patch)
tree8f097e37faa75c2961eb4f063a63c54780e7e16e
parent64a1568ae14d67e084273c74f397476238d112ed (diff)
downloadorg.eclipse.ocl-3a3c2d69f0385e27e47fb2e1cff8fa0c6b0f552a.zip
org.eclipse.ocl-3a3c2d69f0385e27e47fb2e1cff8fa0c6b0f552a.tar.gz
org.eclipse.ocl-3a3c2d69f0385e27e47fb2e1cff8fa0c6b0f552a.tar.bz2
also handle Byte and Short with precision in commonPrecisionNumber
-rw-r--r--plugins/org.eclipse.ocl/src/org/eclipse/ocl/internal/evaluation/NumberUtil.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/org.eclipse.ocl/src/org/eclipse/ocl/internal/evaluation/NumberUtil.java b/plugins/org.eclipse.ocl/src/org/eclipse/ocl/internal/evaluation/NumberUtil.java
index 2fbdefb..637b102 100644
--- a/plugins/org.eclipse.ocl/src/org/eclipse/ocl/internal/evaluation/NumberUtil.java
+++ b/plugins/org.eclipse.ocl/src/org/eclipse/ocl/internal/evaluation/NumberUtil.java
@@ -130,7 +130,7 @@ public class NumberUtil {
return number;
} else if (number instanceof BigInteger) {
return new BigDecimal((BigInteger)number);
- } else if (number instanceof Integer || number instanceof Long) {
+ } else if (number instanceof Integer || number instanceof Long || number instanceof Short || number instanceof Byte) {
return new BigDecimal(number.longValue());
} else {
return BigDecimal.valueOf(number.doubleValue());