From 5aab37b2dece063adf9e7809e38fe3100862f8ca Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Thu, 14 Feb 2008 11:36:01 +0000 Subject: [PATCH] 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 --- src/java/org/apache/fop/fo/properties/NumberProperty.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 { -- 2.39.5