You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by pa...@apache.org on 2015/04/18 20:30:53 UTC

[2/4] incubator-groovy git commit: Documentation: Update Javadoc to reflect actual behaviour of JsonSlurper with decimal numbers

Documentation: Update Javadoc to reflect actual behaviour of JsonSlurper with decimal numbers


Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/2fc7ef3c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/2fc7ef3c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/2fc7ef3c

Branch: refs/heads/GROOVY_2_4_X
Commit: 2fc7ef3c86ab8d58678ba3ba04be044c1b2aec02
Parents: f4bdb57
Author: Alex Spurling <al...@gmail.com>
Authored: Fri Apr 17 12:15:30 2015 +0100
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sat Apr 18 20:30:11 2015 +0200

----------------------------------------------------------------------
 .../groovy-json/src/main/java/groovy/json/JsonToken.java     | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/2fc7ef3c/subprojects/groovy-json/src/main/java/groovy/json/JsonToken.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/JsonToken.java b/subprojects/groovy-json/src/main/java/groovy/json/JsonToken.java
index e6eb262..7bd92c7 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/JsonToken.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/JsonToken.java
@@ -35,10 +35,6 @@ public class JsonToken {
     private static final BigInteger MIN_LONG    = BigInteger.valueOf(Long.MIN_VALUE);
     private static final BigInteger MAX_INTEGER = BigInteger.valueOf(Integer.MAX_VALUE);
     private static final BigInteger MIN_INTEGER = BigInteger.valueOf(Integer.MIN_VALUE);
-    private static final BigDecimal MAX_DOUBLE  = new BigDecimal(String.valueOf(Double.MAX_VALUE));
-    private static final BigDecimal MIN_DOUBLE  = MAX_DOUBLE.negate();
-    private static final BigDecimal MAX_FLOAT   = new BigDecimal(String.valueOf(Float.MAX_VALUE));
-    private static final BigDecimal MIN_FLOAT   = MAX_FLOAT.negate();
 
     /** Start line position */
     private long startLine;
@@ -57,8 +53,8 @@ public class JsonToken {
 
     /**
      * Return the value represented by this token (ie. a number, a string, a boolean or null).
-     * For numbers, the most appropriate type is returned (Float, Double, BigDecimal for decimal numbers,
-     * and Integer, Long and BigInteger for integral numbers).
+     * For numbers, BigDecimal is returned for decimals and Integer, Long or BigInteger for 
+     * integral numbers.
      *
      * @return the represented value
      */