groovy git commit: Refine parsing integer(exception should be thrown when node is null)

2017-08-06 Thread sunlan
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X 80181003a -> 926988e8f


Refine parsing integer(exception should be thrown when node is null)

(cherry picked from commit 2af3c83)


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

Branch: refs/heads/GROOVY_2_6_X
Commit: 926988e8feca51572157e164329e7a16713014ec
Parents: 8018100
Author: sunlan 
Authored: Sun Aug 6 17:11:13 2017 +0800
Committer: sunlan 
Committed: Sun Aug 6 17:12:17 2017 +0800

--
 src/main/org/codehaus/groovy/syntax/Numbers.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/groovy/blob/926988e8/src/main/org/codehaus/groovy/syntax/Numbers.java
--
diff --git a/src/main/org/codehaus/groovy/syntax/Numbers.java 
b/src/main/org/codehaus/groovy/syntax/Numbers.java
index 652ec97..5540d09 100644
--- a/src/main/org/codehaus/groovy/syntax/Numbers.java
+++ b/src/main/org/codehaus/groovy/syntax/Numbers.java
@@ -228,13 +228,13 @@ public class Numbers
 switch (type)
 {
 case 'i':
-if (radix==10 && reportNode != null && 
(value.compareTo(MAX_INTEGER) > 0 || value.compareTo(MIN_INTEGER) < 0) ) {
+if (radix==10 && (value.compareTo(MAX_INTEGER) > 0 || 
value.compareTo(MIN_INTEGER) < 0) ) {
 throw new ASTRuntimeException(reportNode, "Number of value 
"+value+" does not fit in the range of int, but int was enforced.");
 } else {
 return Integer.valueOf(value.intValue());
 }
 case 'l':
-if (radix==10 && reportNode != null && 
(value.compareTo(MAX_LONG) > 0 || value.compareTo(MIN_LONG) < 0) ) {
+if (radix==10 && (value.compareTo(MAX_LONG) > 0 || 
value.compareTo(MIN_LONG) < 0) ) {
 throw new ASTRuntimeException(reportNode, "Number of value 
"+value+" does not fit in the range of long, but long was enforced.");
 } else {
 return new Long( value.longValue() );



groovy git commit: Refine parsing integer(exception should be thrown when node is null)

2017-08-06 Thread sunlan
Repository: groovy
Updated Branches:
  refs/heads/master c04b2a09d -> 2af3c8330


Refine parsing integer(exception should be thrown when node is null)


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

Branch: refs/heads/master
Commit: 2af3c833037eb1bcbdfa1e5e43aff2084b797c97
Parents: c04b2a0
Author: sunlan 
Authored: Sun Aug 6 17:11:13 2017 +0800
Committer: sunlan 
Committed: Sun Aug 6 17:11:13 2017 +0800

--
 src/main/org/codehaus/groovy/syntax/Numbers.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/groovy/blob/2af3c833/src/main/org/codehaus/groovy/syntax/Numbers.java
--
diff --git a/src/main/org/codehaus/groovy/syntax/Numbers.java 
b/src/main/org/codehaus/groovy/syntax/Numbers.java
index 652ec97..5540d09 100644
--- a/src/main/org/codehaus/groovy/syntax/Numbers.java
+++ b/src/main/org/codehaus/groovy/syntax/Numbers.java
@@ -228,13 +228,13 @@ public class Numbers
 switch (type)
 {
 case 'i':
-if (radix==10 && reportNode != null && 
(value.compareTo(MAX_INTEGER) > 0 || value.compareTo(MIN_INTEGER) < 0) ) {
+if (radix==10 && (value.compareTo(MAX_INTEGER) > 0 || 
value.compareTo(MIN_INTEGER) < 0) ) {
 throw new ASTRuntimeException(reportNode, "Number of value 
"+value+" does not fit in the range of int, but int was enforced.");
 } else {
 return Integer.valueOf(value.intValue());
 }
 case 'l':
-if (radix==10 && reportNode != null && 
(value.compareTo(MAX_LONG) > 0 || value.compareTo(MIN_LONG) < 0) ) {
+if (radix==10 && (value.compareTo(MAX_LONG) > 0 || 
value.compareTo(MIN_LONG) < 0) ) {
 throw new ASTRuntimeException(reportNode, "Number of value 
"+value+" does not fit in the range of long, but long was enforced.");
 } else {
 return new Long( value.longValue() );