Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_5_X 2f9dcb49a -> 1140e2018


Trivial refactoring: remove dead store to local variable

(cherry picked from commit 512dc3c)


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

Branch: refs/heads/GROOVY_2_5_X
Commit: 1140e201883a42a9b465e7d34cba89816deeb96c
Parents: 2f9dcb4
Author: sunlan <sun...@apache.org>
Authored: Wed Mar 14 07:47:31 2018 +0800
Committer: sunlan <sun...@apache.org>
Committed: Wed Mar 14 07:49:42 2018 +0800

----------------------------------------------------------------------
 .../java/org/codehaus/groovy/ast/tools/BeanUtils.java     |  1 -
 src/main/java/org/codehaus/groovy/syntax/Numbers.java     | 10 +++-------
 2 files changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/1140e201/src/main/java/org/codehaus/groovy/ast/tools/BeanUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/tools/BeanUtils.java 
b/src/main/java/org/codehaus/groovy/ast/tools/BeanUtils.java
index 5869d4e..ab266c2 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/BeanUtils.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/BeanUtils.java
@@ -95,7 +95,6 @@ public class BeanUtils {
     public static void addPseudoProperties(ClassNode origType, ClassNode 
cNode, List<PropertyNode> result, Set<String> names, boolean includeStatic, 
boolean includePseudoGetters, boolean includePseudoSetters) {
         if (!includePseudoGetters && !includePseudoSetters) return;
         List<MethodNode> methods = cNode.getAllDeclaredMethods();
-        ClassNode node = cNode.getSuperClass();
         for (MethodNode mNode : methods) {
             if (!includeStatic && mNode.isStatic()) continue;
             String name = mNode.getName();

http://git-wip-us.apache.org/repos/asf/groovy/blob/1140e201/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 24510e8..ad69697 100644
--- a/src/main/java/org/codehaus/groovy/syntax/Numbers.java
+++ b/src/main/java/org/codehaus/groovy/syntax/Numbers.java
@@ -279,15 +279,11 @@ public class Numbers
         // case, if present.
 
         char type = 'x';
-        if( isNumericTypeSpecifier(text.charAt(length-1), true) )
-        {
-            type = Character.toLowerCase( text.charAt(length-1) );
-            text = text.substring( 0, length-1 );
-
-            length -= 1;
+        if (isNumericTypeSpecifier(text.charAt(length - 1), true)) {
+            type = Character.toLowerCase(text.charAt(length - 1));
+            text = text.substring(0, length - 1);
         }
 
-
         //
         // Build the specified type or default to BigDecimal
 

Reply via email to