summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlzhang2011-12-01 00:11:06 (EST)
committer mwu2011-12-01 00:11:06 (EST)
commit880d8180bf80a446b077da3a31d746839d1369a1 (patch)
tree7e7df6e38a887dc9ceb8e0fb34de5e9728ba0f3d
parent8dfcd08da47b356551351158bb16717f34df90be (diff)
downloadorg.eclipse.birt-880d8180bf80a446b077da3a31d746839d1369a1.zip
org.eclipse.birt-880d8180bf80a446b077da3a31d746839d1369a1.tar.gz
org.eclipse.birt-880d8180bf80a446b077da3a31d746839d1369a1.tar.bz2
Checkin: Fail to run attached xtab with derived measure [45655]
-rw-r--r--core/org.eclipse.birt.core/src/org/eclipse/birt/core/data/DataTypeUtil.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/org.eclipse.birt.core/src/org/eclipse/birt/core/data/DataTypeUtil.java b/core/org.eclipse.birt.core/src/org/eclipse/birt/core/data/DataTypeUtil.java
index ba4fae9..df71a73 100644
--- a/core/org.eclipse.birt.core/src/org/eclipse/birt/core/data/DataTypeUtil.java
+++ b/core/org.eclipse.birt.core/src/org/eclipse/birt/core/data/DataTypeUtil.java
@@ -316,6 +316,13 @@ public final class DataTypeUtil
// Float, Long, Short, Integer
// An intermediate conversion using String is preferrable per JavaDoc
// comment in BigDecimal(String) constructor
+ if ( source instanceof Double
+ && ( ( (Double) source ).isInfinite( ) || ( (Double) source ).isNaN( ) ) )
+ return null;
+ else if ( source instanceof Float
+ && ( ( (Float) source ).isInfinite( ) || ( (Float) source ).isNaN( ) ) )
+ return null;
+
String str = ( (Number) source ).toString( );
try
{