groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject groovy git commit: Use static `valueOf` instead
Date Tue, 26 Dec 2017 00:02:05 GMT
Repository: groovy
Updated Branches:
  refs/heads/master 430876584 -> a32df1088


Use static `valueOf` instead


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

Branch: refs/heads/master
Commit: a32df1088d8ad11c825b23cb039df2d0f852f068
Parents: 4308765
Author: sunlan <sunlan@apache.org>
Authored: Tue Dec 26 08:01:59 2017 +0800
Committer: sunlan <sunlan@apache.org>
Committed: Tue Dec 26 08:01:59 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/groovy/blob/a32df108/src/main/java/org/codehaus/groovy/syntax/Numbers.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/syntax/Numbers.java b/src/main/java/org/codehaus/groovy/syntax/Numbers.java
index e7a2386..a978701 100644
--- a/src/main/java/org/codehaus/groovy/syntax/Numbers.java
+++ b/src/main/java/org/codehaus/groovy/syntax/Numbers.java
@@ -250,7 +250,7 @@ public class Numbers
                 }
                 else if( value.compareTo(MAX_LONG) <= 0 && value.compareTo(MIN_LONG)
>= 0 )
                 {
-                    return new Long(value.longValue());
+                    return Long.valueOf(value.longValue());
                 }
                 return value;
         }


Mime
View raw message