From: Vincent Hennebert Date: Thu, 14 Feb 2008 11:36:01 +0000 (+0000) Subject: Simplified the detection of double as integer X-Git-Tag: fop-0_95beta~67 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5aab37b2dece063adf9e7809e38fe3100862f8ca;p=xmlgraphics-fop.git Simplified the detection of double as integer git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@627712 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/properties/NumberProperty.java b/src/java/org/apache/fop/fo/properties/NumberProperty.java index 087429dba..6f8d8a1d2 100644 --- a/src/java/org/apache/fop/fo/properties/NumberProperty.java +++ b/src/java/org/apache/fop/fo/properties/NumberProperty.java @@ -80,8 +80,7 @@ public final class NumberProperty extends Property implements Numeric { private NumberProperty(double num) { //Store the number as an int or a long, //if possible - if ((num >= 0 && num == Math.floor(num)) - || num == Math.ceil(num)) { + if (num == Math.floor(num)) { if (num < Integer.MAX_VALUE) { this.number = new Integer((int)num); } else {