groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [1/3] groovy git commit: Use static `valueOf` instead
Date Tue, 26 Dec 2017 01:17:12 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X 319deda42 -> 0e507c9d3


Use static `valueOf` instead

(cherry picked from commit a32df10)


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

Branch: refs/heads/GROOVY_2_6_X
Commit: c5256e83347b94f7beb7757558e659e9cdbc7bfe
Parents: 319deda
Author: sunlan <sunlan@apache.org>
Authored: Tue Dec 26 08:01:59 2017 +0800
Committer: sunlan <sunlan@apache.org>
Committed: Tue Dec 26 09:16:57 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/c5256e83/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