aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/properties/NumberProperty.java
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2008-02-14 11:36:01 +0000
committerVincent Hennebert <vhennebert@apache.org>2008-02-14 11:36:01 +0000
commit5aab37b2dece063adf9e7809e38fe3100862f8ca (patch)
treedec250f7b00a5d76767a91f535b76a34b2a29183 /src/java/org/apache/fop/fo/properties/NumberProperty.java
parente1c8b0065b1d5b8456546abbc9d7e040123c380a (diff)
downloadxmlgraphics-fop-5aab37b2dece063adf9e7809e38fe3100862f8ca.tar.gz
xmlgraphics-fop-5aab37b2dece063adf9e7809e38fe3100862f8ca.zip
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
Diffstat (limited to 'src/java/org/apache/fop/fo/properties/NumberProperty.java')
-rw-r--r--src/java/org/apache/fop/fo/properties/NumberProperty.java3
1 files changed, 1 insertions, 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 {