| author | lzhang | 2011-12-01 00:11:06 (EST) |
|---|---|---|
| committer | mwu | 2011-12-01 00:11:06 (EST) |
| commit | 880d8180bf80a446b077da3a31d746839d1369a1 (patch) (side-by-side diff) | |
| tree | 7e7df6e38a887dc9ceb8e0fb34de5e9728ba0f3d | |
| parent | 8dfcd08da47b356551351158bb16717f34df90be (diff) | |
| download | org.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.java | 7 |
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 { |

