groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwagenleit...@apache.org
Subject [3/4] groovy git commit: make private methods static when they are plain functions (closes #290)
Date Thu, 28 Apr 2016 00:06:18 GMT
make private methods static when they are plain functions (closes #290)


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

Branch: refs/heads/master
Commit: d5d56e8dff8c7a800d3aee6b923adf3ac1c5f94a
Parents: 2cdba2f
Author: oreissig <oreissig+github@gmail.com>
Authored: Fri Mar 4 22:35:49 2016 +0100
Committer: John Wagenleitner <jwagenleitner@apache.org>
Committed: Wed Apr 27 10:44:07 2016 -0700

----------------------------------------------------------------------
 .../groovy/beans/BindableASTTransformation.java |  2 +-
 .../groovy/beans/VetoableASTTransformation.java |  2 +-
 .../grape/GrabAnnotationTransformation.java     |  4 +-
 src/main/groovy/lang/GroovyClassLoader.java     | 10 ++---
 src/main/groovy/lang/GroovyShell.java           |  6 +--
 src/main/groovy/lang/ListWithDefault.java       |  2 +-
 src/main/groovy/lang/MetaClassImpl.java         | 42 ++++++++++----------
 src/main/groovy/lang/ParameterArray.java        |  2 +-
 .../transform/builder/DefaultStrategy.java      | 12 +++---
 .../transform/builder/InitializerStrategy.java  | 10 ++---
 .../transform/stc/FromAbstractTypeMethods.java  |  4 +-
 src/main/groovy/util/ConfigObject.java          |  4 +-
 src/main/groovy/util/Node.java                  |  4 +-
 .../groovy/antlr/AntlrParserPlugin.java         | 10 ++---
 .../groovy/antlr/java/Java2GroovyConverter.java |  4 +-
 .../groovy/antlr/treewalker/MindMapPrinter.java |  4 +-
 .../antlr/treewalker/NodeAsHTMLPrinter.java     |  4 +-
 .../groovy/antlr/treewalker/SourcePrinter.java  |  2 +-
 .../ast/builder/AstBuilderTransformation.java   |  4 +-
 .../groovy/ast/expr/DeclarationExpression.java  |  2 +-
 .../groovy/classgen/AnnotationVisitor.java      |  4 +-
 .../groovy/classgen/AsmClassGenerator.java      |  6 +--
 .../classgen/ClassCompletionVerifier.java       | 12 +++---
 .../groovy/classgen/EnumCompletionVisitor.java  |  4 +-
 .../codehaus/groovy/classgen/EnumVisitor.java   |  6 +--
 .../groovy/classgen/ExtendedVerifier.java       |  6 +--
 .../classgen/InnerClassCompletionVisitor.java   | 10 ++---
 .../groovy/classgen/InnerClassVisitor.java      |  2 +-
 .../groovy/classgen/VariableScopeVisitor.java   |  2 +-
 .../org/codehaus/groovy/classgen/Verifier.java  | 30 +++++++-------
 .../BinaryExpressionMultiTypeDispatcher.java    |  8 ++--
 .../groovy/classgen/asm/ClosureWriter.java      |  4 +-
 .../groovy/classgen/asm/CompileStack.java       |  2 +-
 .../groovy/classgen/asm/InvocationWriter.java   |  2 +-
 .../codehaus/groovy/classgen/asm/MopWriter.java |  2 +-
 .../groovy/classgen/asm/OperandStack.java       |  6 +--
 .../classgen/asm/indy/InvokeDynamicWriter.java  |  4 +-
 .../classgen/asm/sc/StaticInvocationWriter.java |  2 +-
 .../asm/sc/StaticTypesClosureWriter.java        |  2 +-
 .../control/AnnotationConstantsVisitor.java     |  8 ++--
 .../groovy/control/ClassNodeResolver.java       |  8 ++--
 .../groovy/control/CompilationUnit.java         |  4 +-
 .../groovy/control/CompilerConfiguration.java   |  4 +-
 .../groovy/control/GenericsVisitor.java         |  4 +-
 .../codehaus/groovy/control/ResolveVisitor.java | 12 +++---
 .../org/codehaus/groovy/control/SourceUnit.java |  2 +-
 .../groovy/control/StaticImportVisitor.java     | 16 ++++----
 .../codehaus/groovy/control/StaticVerifier.java |  2 +-
 .../customizers/SecureASTCustomizer.java        |  2 +-
 .../builder/SourceAwareCustomizerFactory.java   |  4 +-
 .../groovy/reflection/CachedMethod.java         |  2 +-
 .../codehaus/groovy/reflection/ClassInfo.java   |  4 +-
 .../groovy/reflection/MixinInMetaClass.java     |  2 +-
 .../groovy/reflection/ParameterTypes.java       |  6 +--
 .../groovy/runtime/ProxyGeneratorAdapter.java   | 14 +++----
 .../runtime/m12n/SimpleExtensionModule.java     |  2 +-
 .../runtime/metaclass/ClosureMetaClass.java     |  8 ++--
 .../metaclass/ConcurrentReaderHashMap.java      |  2 +-
 .../metaclass/MetaClassRegistryImpl.java        |  2 +-
 .../runtime/metaclass/MetaMethodIndex.java      |  6 +--
 .../metaclass/MethodSelectionException.java     |  2 +-
 .../groovy/runtime/powerassert/SourceText.java  |  4 +-
 .../groovy/tools/LoaderConfiguration.java       |  6 +--
 .../groovy/tools/javac/JavaStubGenerator.java   | 28 ++++++-------
 .../groovy/tools/javac/JavacJavaCompiler.java   |  2 +-
 .../transform/sc/StaticCompilationVisitor.java  |  6 +--
 .../BinaryExpressionTransformer.java            |  8 ++--
 .../transformers/CastExpressionOptimizer.java   |  2 +-
 .../MethodCallExpressionTransformer.java        |  4 +-
 .../VariableExpressionTransformer.java          |  4 +-
 .../stc/AbstractTypeCheckingExtension.java      |  2 +-
 .../stc/StaticTypeCheckingVisitor.java          | 32 +++++++--------
 .../stc/TraitTypeCheckingExtension.java         |  4 +-
 .../transform/trait/NAryOperationRewriter.java  |  2 +-
 .../trait/TraitReceiverTransformer.java         |  4 +-
 .../groovy/util/AbstractConcurrentMapBase.java  |  4 +-
 .../codehaus/groovy/util/ComplexKeyHashMap.java |  2 +-
 .../org/codehaus/groovy/vmplugin/v5/Java5.java  |  4 +-
 .../org/codehaus/groovy/bsf/GroovyEngine.java   |  2 +-
 .../groovy/tools/groovydoc/GroovyDocTool.java   |  4 +-
 .../groovy/tools/groovydoc/GroovyDocWriter.java |  2 +-
 .../tools/groovydoc/GroovyRootDocBuilder.java   | 16 ++++----
 .../SimpleGroovyClassDocAssembler.java          | 16 ++++----
 .../src/main/java/groovy/json/JsonBuilder.java  |  2 +-
 .../src/main/java/groovy/json/JsonDelegate.java |  2 +-
 .../java/groovy/json/internal/LazyValueMap.java |  2 +-
 .../json/internal/ReaderCharacterSource.java    |  2 +-
 .../java/groovy/json/internal/ValueList.java    |  4 +-
 .../groovy/jsr223/GroovyScriptEngineImpl.java   |  4 +-
 .../groovy/macro/runtime/MacroBuilder.java      |  2 +-
 .../java/groovy/servlet/ServletBinding.java     |  4 +-
 .../src/main/java/groovy/sql/DataSet.java       |  2 +-
 .../java/groovy/sql/ExtractIndexAndSql.java     |  2 +-
 .../src/main/java/groovy/sql/Sql.java           | 12 +++---
 .../groovy/inspect/swingui/TableSorter.java     | 10 ++---
 .../groovy/binding/PropertyBinding.java         |  2 +-
 .../main/java/groovy/util/XmlNodePrinter.java   |  2 +-
 .../src/main/java/groovy/util/XmlParser.java    |  2 +-
 .../src/main/java/groovy/util/XmlSlurper.java   |  2 +-
 .../src/main/java/groovy/xml/DOMBuilder.java    |  2 +-
 .../src/main/java/groovy/xml/MarkupBuilder.java |  2 +-
 .../groovy/xml/NamespaceBuilderSupport.java     |  2 +-
 .../StreamingMarkupWriter.java                  |  2 +-
 103 files changed, 293 insertions(+), 293 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/groovy/beans/BindableASTTransformation.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/beans/BindableASTTransformation.java b/src/main/groovy/beans/BindableASTTransformation.java
index 8754633..31ac190 100644
--- a/src/main/groovy/beans/BindableASTTransformation.java
+++ b/src/main/groovy/beans/BindableASTTransformation.java
@@ -182,7 +182,7 @@ public class BindableASTTransformation implements ASTTransformation, Opcodes {
     /*
      * Wrap an existing setter.
      */
-    private void wrapSetterMethod(ClassNode classNode, String propertyName) {
+    private static void wrapSetterMethod(ClassNode classNode, String propertyName) {
         String getterName = "get" + MetaClassHelper.capitalize(propertyName);
         MethodNode setter = classNode.getSetterMethod("set" + MetaClassHelper.capitalize(propertyName));
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/groovy/beans/VetoableASTTransformation.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/beans/VetoableASTTransformation.java b/src/main/groovy/beans/VetoableASTTransformation.java
index 11696ce..67a1617 100644
--- a/src/main/groovy/beans/VetoableASTTransformation.java
+++ b/src/main/groovy/beans/VetoableASTTransformation.java
@@ -166,7 +166,7 @@ public class VetoableASTTransformation extends BindableASTTransformation {
     /**
      * Wrap an existing setter.
      */
-    private void wrapSetterMethod(ClassNode classNode, boolean bindable, String propertyName) {
+    private static void wrapSetterMethod(ClassNode classNode, boolean bindable, String propertyName) {
         String getterName = "get" + MetaClassHelper.capitalize(propertyName);
         MethodNode setter = classNode.getSetterMethod("set" + MetaClassHelper.capitalize(propertyName));
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/groovy/grape/GrabAnnotationTransformation.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/grape/GrabAnnotationTransformation.java b/src/main/groovy/grape/GrabAnnotationTransformation.java
index 5c5dd6a..16f3b47 100644
--- a/src/main/groovy/grape/GrabAnnotationTransformation.java
+++ b/src/main/groovy/grape/GrabAnnotationTransformation.java
@@ -443,7 +443,7 @@ public class GrabAnnotationTransformation extends ClassCodeVisitorSupport implem
         classNode.addStaticInitializerStatements(grabInitializers, true);
     }
 
-    private void addGrabResolverAsStaticInitIfNeeded(ClassNode grapeClassNode, AnnotationNode node,
+    private static void addGrabResolverAsStaticInitIfNeeded(ClassNode grapeClassNode, AnnotationNode node,
                                                       List<Statement> grabResolverInitializers, Map<String, Object> grabResolverMap) {
         if ((node.getMember("initClass") == null)
             || (node.getMember("initClass") == ConstantExpression.TRUE))
@@ -514,7 +514,7 @@ public class GrabAnnotationTransformation extends ClassCodeVisitorSupport implem
         }
     }
 
-    private void checkForConvenienceForm(AnnotationNode node, boolean exclude) {
+    private static void checkForConvenienceForm(AnnotationNode node, boolean exclude) {
         Object val = node.getMember("value");
         if (val == null || !(val instanceof ConstantExpression)) return;
         Object allParts = ((ConstantExpression)val).getValue();

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/groovy/lang/GroovyClassLoader.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/GroovyClassLoader.java b/src/main/groovy/lang/GroovyClassLoader.java
index 1e4bbf5..ac1f9f9 100644
--- a/src/main/groovy/lang/GroovyClassLoader.java
+++ b/src/main/groovy/lang/GroovyClassLoader.java
@@ -309,7 +309,7 @@ public class GroovyClassLoader extends URLClassLoader {
         return answer;
     }
 
-    private void validate(GroovyCodeSource codeSource) {
+    private static void validate(GroovyCodeSource codeSource) {
         if (codeSource.getFile() == null) {
             if (codeSource.getScriptText() == null) {
                 throw new IllegalArgumentException("Script text to compile cannot be null!");
@@ -809,7 +809,7 @@ public class GroovyClassLoader extends URLClassLoader {
      * where two scripts were sitting in a directory with spaces in its name.  The code would fail
      * when the class loader tried to resolve the file name and would choke on the URLEncoded space values.
      */
-    private String decodeFileName(String fileName) {
+    private static String decodeFileName(String fileName) {
         String decodedFile = fileName;
         try {
             decodedFile = URLDecoder.decode(fileName, "UTF-8");
@@ -821,11 +821,11 @@ public class GroovyClassLoader extends URLClassLoader {
         return decodedFile;
     }
 
-    private boolean isFile(URL ret) {
+    private static boolean isFile(URL ret) {
         return ret != null && ret.getProtocol().equals("file");
     }
 
-    private File getFileForUrl(URL ret, String filename) {
+    private static File getFileForUrl(URL ret, String filename) {
         String fileWithoutPackage = filename;
         if (fileWithoutPackage.indexOf('/') != -1) {
             int index = fileWithoutPackage.lastIndexOf('/');
@@ -834,7 +834,7 @@ public class GroovyClassLoader extends URLClassLoader {
         return fileReallyExists(ret, fileWithoutPackage);
     }
 
-    private File fileReallyExists(URL ret, String fileWithoutPackage) {
+    private static File fileReallyExists(URL ret, String fileWithoutPackage) {
         File path;
         try {
             /* fix for GROOVY-5809 */ 

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/groovy/lang/GroovyShell.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/GroovyShell.java b/src/main/groovy/lang/GroovyShell.java
index 1b9ae88..a8b8941 100644
--- a/src/main/groovy/lang/GroovyShell.java
+++ b/src/main/groovy/lang/GroovyShell.java
@@ -324,7 +324,7 @@ public class GroovyShell extends GroovyObjectSupport {
         }
     }
 
-    private Object runRunnable(Class scriptClass, String[] args) {
+    private static Object runRunnable(Class scriptClass, String[] args) {
         Constructor constructor = null;
         Runnable runnable = null;
         Throwable reason = null;
@@ -369,7 +369,7 @@ public class GroovyShell extends GroovyObjectSupport {
      *
      * @param scriptClass the class to be run as a unit test
      */
-    private Object runJUnit3Test(Class scriptClass) {
+    private static Object runJUnit3Test(Class scriptClass) {
         try {
             Object testSuite = InvokerHelper.invokeConstructorOf("junit.framework.TestSuite", new Object[]{scriptClass});
             return InvokerHelper.invokeStaticMethod("junit.textui.TestRunner", "run", new Object[]{testSuite});
@@ -386,7 +386,7 @@ public class GroovyShell extends GroovyObjectSupport {
      *
      * @param scriptClass the class to be run as a unit test
      */
-    private Object runJUnit3TestSuite(Class scriptClass) {
+    private static Object runJUnit3TestSuite(Class scriptClass) {
         try {
             Object testSuite = InvokerHelper.invokeStaticMethod(scriptClass, "suite", new Object[]{});
             return InvokerHelper.invokeStaticMethod("junit.textui.TestRunner", "run", new Object[]{testSuite});

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/groovy/lang/ListWithDefault.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/ListWithDefault.java b/src/main/groovy/lang/ListWithDefault.java
index 91466fb..b0d2950 100644
--- a/src/main/groovy/lang/ListWithDefault.java
+++ b/src/main/groovy/lang/ListWithDefault.java
@@ -198,7 +198,7 @@ public final class ListWithDefault<T> implements List<T> {
         return (T) initClosure.call(new Object[]{idx});
     }
 
-    private int normaliseIndex(int index, int size) {
+    private static int normaliseIndex(int index, int size) {
         if (index < 0) {
             index += size;
         }

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/groovy/lang/MetaClassImpl.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/MetaClassImpl.java b/src/main/groovy/lang/MetaClassImpl.java
index c0d1d7c..4af03cd 100644
--- a/src/main/groovy/lang/MetaClassImpl.java
+++ b/src/main/groovy/lang/MetaClassImpl.java
@@ -1272,7 +1272,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
         return metaClass;
     }
 
-    private Object invokeMethodOnGroovyObject(String methodName, Object[] originalArguments, Object owner) {
+    private static Object invokeMethodOnGroovyObject(String methodName, Object[] originalArguments, Object owner) {
         GroovyObject go = (GroovyObject) owner;
         return go.invokeMethod(methodName, originalArguments);
     }
@@ -1486,7 +1486,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
         return invokeStaticMissingMethod(sender, methodName, arguments);
     }
 
-    private Object invokeStaticClosureProperty(Object[] originalArguments, Object prop) {
+    private static Object invokeStaticClosureProperty(Object[] originalArguments, Object prop) {
         Closure closure = (Closure) prop;
         MetaClass delegateMetaClass = closure.getMetaClass();
         return delegateMetaClass.invokeMethod(closure.getClass(), closure, CLOSURE_DO_CALL_METHOD, originalArguments, false, false);
@@ -2031,7 +2031,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
 
 
 
-    private MetaMethod getCategoryMethodGetter(Class sender, String name, boolean useLongVersion) {
+    private static MetaMethod getCategoryMethodGetter(Class sender, String name, boolean useLongVersion) {
         List possibleGenericMethods = GroovyCategorySupport.getCategoryMethods(name);
         if (possibleGenericMethods != null) {
             for (Iterator iter = possibleGenericMethods.iterator(); iter.hasNext();) {
@@ -2052,7 +2052,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
         return null;
     }
 
-    private MetaMethod getCategoryMethodSetter(Class sender, String name, boolean useLongVersion) {
+    private static MetaMethod getCategoryMethodSetter(Class sender, String name, boolean useLongVersion) {
         List possibleGenericMethods = GroovyCategorySupport.getCategoryMethods(name);
         if (possibleGenericMethods != null) {
             for (Iterator iter = possibleGenericMethods.iterator(); iter.hasNext();) {
@@ -2120,7 +2120,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
      * return null if nothing valid has been found, a MetaMethod (for getter always the case if not null) or
      * a LinkedList&lt;MetaMethod&gt; if there are multiple setter
      */
-    private Object filterPropertyMethod(Object methodOrList, boolean isGetter, boolean booleanGetter) {
+    private static Object filterPropertyMethod(Object methodOrList, boolean isGetter, boolean booleanGetter) {
         // Method has been optimized to reach a target of 325 bytecode size, making it JIT'able
         Object ret = null;
 
@@ -2186,7 +2186,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
         return method;
     }
 
-    private Object addElementToList(Object ret, MetaMethod element) {
+    private static Object addElementToList(Object ret, MetaMethod element) {
         if (ret == null)
             ret = element;
         else if (ret instanceof List)
@@ -2296,7 +2296,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
 
     }
 
-    private MetaProperty establishStaticMetaProperty(MetaProperty mp) {
+    private static MetaProperty establishStaticMetaProperty(MetaProperty mp) {
         MetaBeanProperty mbp = (MetaBeanProperty) mp;
         MetaProperty result = null;
         final MetaMethod getterMethod = mbp.getGetter();
@@ -2375,14 +2375,14 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
         }
     }
 
-    private void addFields(final CachedClass klass, SingleKeyHashMap propertyIndex) {
+    private static void addFields(final CachedClass klass, SingleKeyHashMap propertyIndex) {
         CachedField[] fields = klass.getFields();
         for (CachedField field : fields) {
             propertyIndex.put(field.getName(), field);
         }
     }
 
-    private void copyNonPrivateFields(SingleKeyHashMap from, SingleKeyHashMap to) {
+    private static void copyNonPrivateFields(SingleKeyHashMap from, SingleKeyHashMap to) {
         for (ComplexKeyHashMap.EntryIterator iter = from.getEntrySetIterator(); iter.hasNext();) {
             SingleKeyHashMap.Entry entry = (SingleKeyHashMap.Entry) iter.next();
             CachedField mfp = (CachedField) entry.getValue();
@@ -2425,7 +2425,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
 
     private static final ConcurrentMap<String, String> PROP_NAMES = new ConcurrentHashMap<String, String>(1024);
 
-    private String getPropName(String methodName) {
+    private static String getPropName(String methodName) {
         String name = PROP_NAMES.get(methodName);
         if (name == null) {
             // assume "is" or "[gs]et"
@@ -2437,7 +2437,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
         return name;
     }
 
-    private MetaProperty makeReplacementMetaProperty(MetaProperty mp, String propName, boolean isGetter, MetaMethod propertyMethod) {
+    private static MetaProperty makeReplacementMetaProperty(MetaProperty mp, String propName, boolean isGetter, MetaMethod propertyMethod) {
         if (mp == null) {
             if (isGetter) {
                 return new MetaBeanProperty(propName,
@@ -2485,7 +2485,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
 
     }
 
-    private void createMetaBeanProperty(SingleKeyHashMap propertyIndex, String propName, boolean isGetter, MetaMethod propertyMethod) {
+    private static void createMetaBeanProperty(SingleKeyHashMap propertyIndex, String propName, boolean isGetter, MetaMethod propertyMethod) {
         // is this property already accounted for?
         MetaProperty mp = (MetaProperty) propertyIndex.get(propName);
         MetaProperty newMp = makeReplacementMetaProperty(mp, propName, isGetter, propertyMethod);
@@ -2724,7 +2724,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
         invokeMissingProperty(object, name, newValue, false);
     }
 
-    private boolean isPrivateOrPkgPrivate(int mod) {
+    private static boolean isPrivateOrPkgPrivate(int mod) {
         return !Modifier.isProtected(mod) && !Modifier.isPublic(mod);
     }
 
@@ -2972,15 +2972,15 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
         }
     }
 
-    private boolean isSetPropertyMethod(MetaMethod metaMethod) {
+    private static boolean isSetPropertyMethod(MetaMethod metaMethod) {
         return SET_PROPERTY_METHOD.equals(metaMethod.getName())  && metaMethod.getParameterTypes().length == 2;
     }
 
-    private boolean isGetPropertyMethod(MetaMethod metaMethod) {
+    private static boolean isGetPropertyMethod(MetaMethod metaMethod) {
         return GET_PROPERTY_METHOD.equals(metaMethod.getName());
     }
 
-    private boolean isInvokeMethod(MetaMethod metaMethod) {
+    private static boolean isInvokeMethod(MetaMethod metaMethod) {
         return INVOKE_METHOD_METHOD.equals(metaMethod.getName()) && metaMethod.getParameterTypes().length == 2;
     }
 
@@ -3027,7 +3027,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
      *        null:  ignore method
      *        true:  replace
      */
-    private Boolean getMatchKindForCategory(MetaMethod aMethod, MetaMethod categoryMethod) {
+    private static Boolean getMatchKindForCategory(MetaMethod aMethod, MetaMethod categoryMethod) {
         CachedClass[] params1 = aMethod.getParameterTypes();
         CachedClass[] params2 = categoryMethod.getParameterTypes();
         if (params1.length != params2.length) return Boolean.FALSE;
@@ -3045,7 +3045,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
         return null;
     }
 
-    private void filterMatchingMethodForCategory(FastArray list, MetaMethod method) {
+    private static void filterMatchingMethodForCategory(FastArray list, MetaMethod method) {
         int len = list.size();
         if (len==0) {
             list.add(method);
@@ -3237,7 +3237,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
         throw new GroovyRuntimeException(msg.toString());
     }
 
-    private boolean isGenericGetMethod(MetaMethod method) {
+    private static boolean isGenericGetMethod(MetaMethod method) {
         if (method.getName().equals("get")) {
             CachedClass[] parameterTypes = method.getParameterTypes();
             return parameterTypes.length == 1 && parameterTypes[0].getTheClass() == String.class;
@@ -3316,7 +3316,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
         }
     }
 
-    private boolean isBeanDerivative(Class theClass) {
+    private static boolean isBeanDerivative(Class theClass) {
         Class next = theClass;
         while (next != null) {
             if (Arrays.asList(next.getInterfaces()).contains(BeanInfo.class)) return true;
@@ -3526,7 +3526,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
         return property;
     }
 
-    private MetaBeanProperty getMetaPropertyFromMutableMetaClass(String propertyName, MetaClass metaClass) {
+    private static MetaBeanProperty getMetaPropertyFromMutableMetaClass(String propertyName, MetaClass metaClass) {
         final boolean isModified = ((MutableMetaClass) metaClass).isModified();
         if (isModified) {
             final MetaProperty metaProperty = metaClass.getMetaProperty(propertyName);

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/groovy/lang/ParameterArray.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/ParameterArray.java b/src/main/groovy/lang/ParameterArray.java
index c32c6aa..c030b84 100644
--- a/src/main/groovy/lang/ParameterArray.java
+++ b/src/main/groovy/lang/ParameterArray.java
@@ -31,7 +31,7 @@ public class ParameterArray {
         parameters = packArray(data);
     }
 
-    private Object packArray(Object object) {
+    private static Object packArray(Object object) {
         if (object instanceof Object[])
             return (Object[]) object;
         else

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/groovy/transform/builder/DefaultStrategy.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/transform/builder/DefaultStrategy.java b/src/main/groovy/transform/builder/DefaultStrategy.java
index 6a72dc0..c863410 100644
--- a/src/main/groovy/transform/builder/DefaultStrategy.java
+++ b/src/main/groovy/transform/builder/DefaultStrategy.java
@@ -211,31 +211,31 @@ public class DefaultStrategy extends BuilderASTTransformation.AbstractBuilderStr
         builder.addMethod(createBuildMethod(anno, buildee, filteredFields));
     }
 
-    private ClassNode getCorrectedType(ClassNode buildee, FieldNode fieldNode) {
+    private static ClassNode getCorrectedType(ClassNode buildee, FieldNode fieldNode) {
         Map<String,ClassNode> genericsSpec = createGenericsSpec(fieldNode.getDeclaringClass());
         extractSuperClassGenerics(fieldNode.getType(), buildee, genericsSpec);
         return correctToGenericsSpecRecurse(genericsSpec, fieldNode.getType());
     }
 
-    private void createBuilderFactoryMethod(AnnotationNode anno, ClassNode buildee, ClassNode builder) {
+    private static void createBuilderFactoryMethod(AnnotationNode anno, ClassNode buildee, ClassNode builder) {
         buildee.getModule().addClass(builder);
         buildee.addMethod(createBuilderMethod(anno, builder));
     }
 
-    private ClassNode createBuilder(AnnotationNode anno, ClassNode buildee) {
+    private static ClassNode createBuilder(AnnotationNode anno, ClassNode buildee) {
         return new InnerClassNode(buildee, getFullName(anno, buildee), PUBLIC_STATIC, OBJECT_TYPE);
     }
 
-    private String getFullName(AnnotationNode anno, ClassNode buildee) {
+    private static String getFullName(AnnotationNode anno, ClassNode buildee) {
         String builderClassName = getMemberStringValue(anno, "builderClassName", buildee.getNameWithoutPackage() + "Builder");
         return buildee.getName() + "$" + builderClassName;
     }
 
-    private String getPrefix(AnnotationNode anno) {
+    private static String getPrefix(AnnotationNode anno) {
         return getMemberStringValue(anno, "prefix", "");
     }
 
-    private MethodNode createBuildMethodForMethod(AnnotationNode anno, ClassNode buildee, MethodNode mNode, Parameter[] params) {
+    private static MethodNode createBuildMethodForMethod(AnnotationNode anno, ClassNode buildee, MethodNode mNode, Parameter[] params) {
         String buildMethodName = getMemberStringValue(anno, "buildMethodName", "build");
         final BlockStatement body = new BlockStatement();
         ClassNode returnType;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/groovy/transform/builder/InitializerStrategy.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/transform/builder/InitializerStrategy.java b/src/main/groovy/transform/builder/InitializerStrategy.java
index 4b59833..37eddf2 100644
--- a/src/main/groovy/transform/builder/InitializerStrategy.java
+++ b/src/main/groovy/transform/builder/InitializerStrategy.java
@@ -191,11 +191,11 @@ public class InitializerStrategy extends BuilderASTTransformation.AbstractBuilde
         }
     }
 
-    private String getBuilderClassName(ClassNode buildee, AnnotationNode anno) {
+    private static String getBuilderClassName(ClassNode buildee, AnnotationNode anno) {
         return getMemberStringValue(anno, "builderClassName", buildee.getNameWithoutPackage() + "Initializer");
     }
 
-    private void addFields(ClassNode buildee, List<FieldNode> filteredFields, ClassNode builder) {
+    private static void addFields(ClassNode buildee, List<FieldNode> filteredFields, ClassNode builder) {
         for (FieldNode filteredField : filteredFields) {
             builder.addField(createFieldCopy(buildee, filteredField));
         }
@@ -214,7 +214,7 @@ public class InitializerStrategy extends BuilderASTTransformation.AbstractBuilde
         builder.addMethod(createBuildMethod(builder, buildMethodName, fieldNodes));
     }
 
-    private List<FieldNode> convertParamsToFields(ClassNode builder, Parameter[] parameters) {
+    private static List<FieldNode> convertParamsToFields(ClassNode builder, Parameter[] parameters) {
         List<FieldNode> fieldNodes = new ArrayList<FieldNode>();
         for(Parameter parameter: parameters) {
             Map<String,ClassNode> genericsSpec = createGenericsSpec(builder);
@@ -226,7 +226,7 @@ public class InitializerStrategy extends BuilderASTTransformation.AbstractBuilde
         return fieldNodes;
     }
 
-    private ClassNode createInnerHelperClass(ClassNode buildee, String builderClassName, int fieldsSize) {
+    private static ClassNode createInnerHelperClass(ClassNode buildee, String builderClassName, int fieldsSize) {
         final String fullName = buildee.getName() + "$" + builderClassName;
         ClassNode builder = new InnerClassNode(buildee, fullName, PUBLIC_STATIC, OBJECT_TYPE);
         GenericsType[] gtypes = new GenericsType[fieldsSize];
@@ -346,7 +346,7 @@ public class InitializerStrategy extends BuilderASTTransformation.AbstractBuilde
         ));
     }
 
-    private GenericsType makePlaceholder(int i) {
+    private static GenericsType makePlaceholder(int i) {
         ClassNode type = ClassHelper.makeWithoutCaching("T" + i);
         type.setRedirect(OBJECT_TYPE);
         type.setGenericsPlaceHolder(true);

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/groovy/transform/stc/FromAbstractTypeMethods.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/transform/stc/FromAbstractTypeMethods.java b/src/main/groovy/transform/stc/FromAbstractTypeMethods.java
index 23171f2..e5125f1 100644
--- a/src/main/groovy/transform/stc/FromAbstractTypeMethods.java
+++ b/src/main/groovy/transform/stc/FromAbstractTypeMethods.java
@@ -45,7 +45,7 @@ public class FromAbstractTypeMethods extends ClosureSignatureHint {
         return extractSignaturesFromMethods(cn);
     }
 
-    private List<ClassNode[]> extractSignaturesFromMethods(final ClassNode cn) {
+    private static List<ClassNode[]> extractSignaturesFromMethods(final ClassNode cn) {
         List<MethodNode> methods = cn.getAllDeclaredMethods();
         List<ClassNode[]> signatures = new LinkedList<ClassNode[]>();
         for (MethodNode method : methods) {
@@ -56,7 +56,7 @@ public class FromAbstractTypeMethods extends ClosureSignatureHint {
         return signatures;
     }
 
-    private void extractParametersFromMethod(final List<ClassNode[]> signatures, final MethodNode method) {
+    private static void extractParametersFromMethod(final List<ClassNode[]> signatures, final MethodNode method) {
         if (Traits.hasDefaultImplementation(method)) return;
         Parameter[] parameters = method.getParameters();
         ClassNode[] typeParams = new ClassNode[parameters.length];

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/groovy/util/ConfigObject.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/util/ConfigObject.java b/src/main/groovy/util/ConfigObject.java
index a9e2803..8452455 100644
--- a/src/main/groovy/util/ConfigObject.java
+++ b/src/main/groovy/util/ConfigObject.java
@@ -255,7 +255,7 @@ public class ConfigObject extends GroovyObjectSupport implements Writable, Map,
         }
     }
 
-    private void writeValue(String key, String space, String prefix, Object value, BufferedWriter out) throws IOException {
+    private static void writeValue(String key, String space, String prefix, Object value, BufferedWriter out) throws IOException {
 //        key = key.indexOf('.') > -1 ? InvokerHelper.inspect(key) : key;
         boolean isKeyword = KEYWORDS.contains(key);
         key = isKeyword ? InvokerHelper.inspect(key) : key;
@@ -274,7 +274,7 @@ public class ConfigObject extends GroovyObjectSupport implements Writable, Map,
         out.newLine();
     }
 
-    private Properties convertValuesToString(Map props) {
+    private static Properties convertValuesToString(Map props) {
         Properties newProps = new Properties();
 
         for (Object o : props.entrySet()) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/groovy/util/Node.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/util/Node.java b/src/main/groovy/util/Node.java
index 90ee450..de0f0ce 100644
--- a/src/main/groovy/util/Node.java
+++ b/src/main/groovy/util/Node.java
@@ -140,7 +140,7 @@ public class Node implements Serializable, Cloneable {
         }
     }
 
-    private List getParentList(Node parent) {
+    private static List getParentList(Node parent) {
         Object parentValue = parent.value();
         List parentList;
         if (parentValue instanceof List) {
@@ -281,7 +281,7 @@ public class Node implements Serializable, Cloneable {
         parent().children().addAll(tail);
     }
 
-    private List<Node> buildChildrenFromClosure(Closure c) {
+    private static List<Node> buildChildrenFromClosure(Closure c) {
         NodeBuilder b = new NodeBuilder();
         Node newNode = (Node) b.invokeMethod("dummyNode", c);
         return newNode.children();

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/antlr/AntlrParserPlugin.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/antlr/AntlrParserPlugin.java b/src/main/org/codehaus/groovy/antlr/AntlrParserPlugin.java
index a3cf966..55a80ac 100644
--- a/src/main/org/codehaus/groovy/antlr/AntlrParserPlugin.java
+++ b/src/main/org/codehaus/groovy/antlr/AntlrParserPlugin.java
@@ -272,7 +272,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
         }
     }
 
-    private void saveAsXML(String name, AST ast) {
+    private static void saveAsXML(String name, AST ast) {
         XStreamUtils.serialize(name+".antlr", ast);
     }
 
@@ -915,7 +915,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
         methodNode = oldNode;
     }
 
-    private void checkNoInvalidModifier(AST node, String nodeType, int modifiers, int modifier, String modifierText) {
+    private static void checkNoInvalidModifier(AST node, String nodeType, int modifiers, int modifier, String modifierText) {
         if ((modifiers & modifier) != 0) {
             throw new ASTRuntimeException(node, nodeType + " has an incorrect modifier '" + modifierText + "'.");
         }
@@ -2549,7 +2549,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
         return ret;
     }
 
-    private void setTypeArgumentsOnMethodCallExpression(MethodCallExpression expression,
+    private static void setTypeArgumentsOnMethodCallExpression(MethodCallExpression expression,
                                                         List<GenericsType> typeArgumentList) {
         if (typeArgumentList != null && !typeArgumentList.isEmpty()) {
             expression.setGenericsTypes(typeArgumentList.toArray(new GenericsType[typeArgumentList.size()]));
@@ -2596,7 +2596,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
         return ret;
     }
 
-    private ClassNode getAnonymousInnerClassNode(Expression arguments) {
+    private static ClassNode getAnonymousInnerClassNode(Expression arguments) {
         if (arguments instanceof TupleExpression) {
             TupleExpression te = (TupleExpression) arguments;
             List<Expression> expressions = te.getExpressions();
@@ -2696,7 +2696,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
         }
     }
 
-    private void checkDuplicateNamedParams(AST elist, List expressionList) {
+    private static void checkDuplicateNamedParams(AST elist, List expressionList) {
         if (expressionList.isEmpty()) return;
 
         Set<String> namedArgumentNames = new HashSet<String>();

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/antlr/java/Java2GroovyConverter.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/antlr/java/Java2GroovyConverter.java b/src/main/org/codehaus/groovy/antlr/java/Java2GroovyConverter.java
index 74ce2e4..faa5a54 100644
--- a/src/main/org/codehaus/groovy/antlr/java/Java2GroovyConverter.java
+++ b/src/main/org/codehaus/groovy/antlr/java/Java2GroovyConverter.java
@@ -219,12 +219,12 @@ public class Java2GroovyConverter extends VisitorAdapter{
         }
     }
 
-    private boolean isSingleQuoted(String text) {
+    private static boolean isSingleQuoted(String text) {
         return text != null && text.length() > 2
                 && text.charAt(0) == '\''
                 && text.charAt(text.length() - 1) == '\'';
     }
-    private boolean isDoubleQuoted(String text) {
+    private static boolean isDoubleQuoted(String text) {
         return text != null && text.length() > 2
                 && text.charAt(0) == '"'
                 && text.charAt(text.length() - 1) == '"';

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/antlr/treewalker/MindMapPrinter.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/antlr/treewalker/MindMapPrinter.java b/src/main/org/codehaus/groovy/antlr/treewalker/MindMapPrinter.java
index 3a9be69..7271466 100644
--- a/src/main/org/codehaus/groovy/antlr/treewalker/MindMapPrinter.java
+++ b/src/main/org/codehaus/groovy/antlr/treewalker/MindMapPrinter.java
@@ -90,7 +90,7 @@ public class MindMapPrinter extends VisitorAdapter {
         return "";
     }
 
-    private String getColour(GroovySourceAST t) {
+    private static String getColour(GroovySourceAST t) {
         String colour = "";
         String black = " COLOR=\"#000000\"";
         String cyan = " COLOR=\"#006699\"";
@@ -362,7 +362,7 @@ public class MindMapPrinter extends VisitorAdapter {
         return name;
     }
 
-    private String escape(String name) {
+    private static String escape(String name) {
         if (name == null) return null;
         // remove middle of large bits of text
         if (name.length() > 200) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/antlr/treewalker/NodeAsHTMLPrinter.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/antlr/treewalker/NodeAsHTMLPrinter.java b/src/main/org/codehaus/groovy/antlr/treewalker/NodeAsHTMLPrinter.java
index 3c1cffe..c68cf9e 100644
--- a/src/main/org/codehaus/groovy/antlr/treewalker/NodeAsHTMLPrinter.java
+++ b/src/main/org/codehaus/groovy/antlr/treewalker/NodeAsHTMLPrinter.java
@@ -58,7 +58,7 @@ public class NodeAsHTMLPrinter extends VisitorAdapter {
         }
     }
 
-    private String quote(String tokenName) {
+    private static String quote(String tokenName) {
         if (tokenName.length() > 0 && tokenName.charAt(0) != '\'')
             return "'" + tokenName + "'";
         else
@@ -69,7 +69,7 @@ public class NodeAsHTMLPrinter extends VisitorAdapter {
         out.println("</pre></body></html>");
     }
 
-    private String colour(GroovySourceAST t) {
+    private static String colour(GroovySourceAST t) {
         String black = "000000";
         String blue = "17178B";
         String green = "008000";

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/antlr/treewalker/SourcePrinter.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/antlr/treewalker/SourcePrinter.java b/src/main/org/codehaus/groovy/antlr/treewalker/SourcePrinter.java
index 232f374..818e179 100644
--- a/src/main/org/codehaus/groovy/antlr/treewalker/SourcePrinter.java
+++ b/src/main/org/codehaus/groovy/antlr/treewalker/SourcePrinter.java
@@ -900,7 +900,7 @@ public class SourcePrinter extends VisitorAdapter {
         }
     }
 
-    private String escape(String literal) {
+    private static String escape(String literal) {
         literal = literal.replaceAll("\n","\\\\<<REMOVE>>n"); // can't seem to do \n in one go with Java regex
         literal = literal.replaceAll("<<REMOVE>>","");
         return literal;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/ast/builder/AstBuilderTransformation.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/ast/builder/AstBuilderTransformation.java b/src/main/org/codehaus/groovy/ast/builder/AstBuilderTransformation.java
index 4143e34..1695db4 100644
--- a/src/main/org/codehaus/groovy/ast/builder/AstBuilderTransformation.java
+++ b/src/main/org/codehaus/groovy/ast/builder/AstBuilderTransformation.java
@@ -114,7 +114,7 @@ public class AstBuilderTransformation extends MethodCallTransformation {
             return false;
         }
 
-        private List<Expression> getNonClosureArguments(MethodCallExpression call) {
+        private static List<Expression> getNonClosureArguments(MethodCallExpression call) {
             List<Expression> result = new ArrayList<Expression>();
             if (call.getArguments() instanceof TupleExpression) {
                 for (ASTNode node : ((TupleExpression) call.getArguments()).getExpressions()) {
@@ -126,7 +126,7 @@ public class AstBuilderTransformation extends MethodCallTransformation {
             return result;
         }
 
-        private ClosureExpression getClosureArgument(MethodCallExpression call) {
+        private static ClosureExpression getClosureArgument(MethodCallExpression call) {
 
             if (call.getArguments() instanceof TupleExpression) {
                 for (ASTNode node : ((TupleExpression) call.getArguments()).getExpressions()) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/ast/expr/DeclarationExpression.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/ast/expr/DeclarationExpression.java b/src/main/org/codehaus/groovy/ast/expr/DeclarationExpression.java
index 4b1fb12..51dad92 100644
--- a/src/main/org/codehaus/groovy/ast/expr/DeclarationExpression.java
+++ b/src/main/org/codehaus/groovy/ast/expr/DeclarationExpression.java
@@ -74,7 +74,7 @@ public class DeclarationExpression extends BinaryExpression {
         check(left);
     }
     
-    private void check(Expression left) {
+    private static void check(Expression left) {
         if (left instanceof VariableExpression) {
             //nothing
         } else if (left instanceof TupleExpression) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/AnnotationVisitor.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/AnnotationVisitor.java b/src/main/org/codehaus/groovy/classgen/AnnotationVisitor.java
index 82276f6..cc7d77c 100644
--- a/src/main/org/codehaus/groovy/classgen/AnnotationVisitor.java
+++ b/src/main/org/codehaus/groovy/classgen/AnnotationVisitor.java
@@ -177,7 +177,7 @@ public class AnnotationVisitor {
         return method.getReturnType();
     }
 
-    private boolean isValidAnnotationClass(ClassNode node) {
+    private static boolean isValidAnnotationClass(ClassNode node) {
         return node.implementsInterface(ClassHelper.Annotation_TYPE);
     }
 
@@ -283,7 +283,7 @@ public class AnnotationVisitor {
         }
     }
 
-    private boolean hasCompatibleType(ClassNode attrType, ClassNode wrapperType) {
+    private static boolean hasCompatibleType(ClassNode attrType, ClassNode wrapperType) {
         return wrapperType.isDerivedFrom(ClassHelper.getWrapper(attrType));
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/AsmClassGenerator.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/AsmClassGenerator.java b/src/main/org/codehaus/groovy/classgen/AsmClassGenerator.java
index e1adeb4..e83aca2 100644
--- a/src/main/org/codehaus/groovy/classgen/AsmClassGenerator.java
+++ b/src/main/org/codehaus/groovy/classgen/AsmClassGenerator.java
@@ -350,7 +350,7 @@ public class AsmClassGenerator extends ClassGenerator {
         genericParameterNames.put(type.getName(), genericsType);
     }
 
-    private String[] buildExceptions(ClassNode[] exceptions) {
+    private static String[] buildExceptions(ClassNode[] exceptions) {
         if (exceptions == null) return null;
         String[] ret = new String[exceptions.length];
         for (int i = 0; i < exceptions.length; i++) {
@@ -1797,7 +1797,7 @@ public class AsmClassGenerator extends ClassGenerator {
         operandStack.push(ClassHelper.LIST_TYPE);
     }
 
-    private boolean containsOnlyConstants(ListExpression list) {
+    private static boolean containsOnlyConstants(ListExpression list) {
         for (Expression exp : list.getExpressions()) {
             if (exp instanceof ConstantExpression) continue;
             return false;
@@ -1951,7 +1951,7 @@ public class AsmClassGenerator extends ClassGenerator {
         }
     }
 
-    private int determineCommonArrayType(List values) {
+    private static int determineCommonArrayType(List values) {
         Expression expr = (Expression) values.get(0);
         int arrayElementType = -1;
         if (expr instanceof AnnotationConstantExpression) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/ClassCompletionVerifier.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/ClassCompletionVerifier.java b/src/main/org/codehaus/groovy/classgen/ClassCompletionVerifier.java
index 6ca12e6..2867c0a 100644
--- a/src/main/org/codehaus/groovy/classgen/ClassCompletionVerifier.java
+++ b/src/main/org/codehaus/groovy/classgen/ClassCompletionVerifier.java
@@ -207,15 +207,15 @@ public class ClassCompletionVerifier extends ClassCodeVisitorSupport {
         addError("The " + getDescription(node) + " has an incorrect modifier " + modifierName + ".", node);
     }
 
-    private String getDescription(ClassNode node) {
+    private static String getDescription(ClassNode node) {
         return (node.isInterface() ? (Traits.isTrait(node)?"trait":"interface") : "class") + " '" + node.getName() + "'";
     }
 
-    private String getDescription(MethodNode node) {
+    private static String getDescription(MethodNode node) {
         return "method '" + node.getTypeDescriptor() + "'";
     }
 
-    private String getDescription(FieldNode node) {
+    private static String getDescription(FieldNode node) {
         return "field '" + node.getName() + "'";
     }
 
@@ -271,7 +271,7 @@ public class ClassCompletionVerifier extends ClassCodeVisitorSupport {
         }
     }
 
-    private boolean isConstructor(MethodNode method) {
+    private static boolean isConstructor(MethodNode method) {
         return method.getName().equals("<clinit>");
     }
 
@@ -330,7 +330,7 @@ public class ClassCompletionVerifier extends ClassCodeVisitorSupport {
         addError(msg.toString(), method);
     }
 
-    private boolean hasEqualParameterTypes(Parameter[] first, Parameter[] second) {
+    private static boolean hasEqualParameterTypes(Parameter[] first, Parameter[] second) {
         if (first.length != second.length) return false;
         for (int i = 0; i < first.length; i++) {
             String ft = first[i].getType().getName();
@@ -636,7 +636,7 @@ public class ClassCompletionVerifier extends ClassCodeVisitorSupport {
         }
     }
 
-    private String getRefDescriptor(ASTNode ref) {
+    private static String getRefDescriptor(ASTNode ref) {
         if (ref instanceof FieldNode) {
             FieldNode f = (FieldNode) ref;
             return "the field "+f.getName()+" ";

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/EnumCompletionVisitor.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/EnumCompletionVisitor.java b/src/main/org/codehaus/groovy/classgen/EnumCompletionVisitor.java
index d3f8f12..fbae932 100644
--- a/src/main/org/codehaus/groovy/classgen/EnumCompletionVisitor.java
+++ b/src/main/org/codehaus/groovy/classgen/EnumCompletionVisitor.java
@@ -70,7 +70,7 @@ public class EnumCompletionVisitor extends ClassCodeVisitorSupport {
     /**
      * Add map and no-arg constructor or mirror those of the superclass (i.e. base enum).
      */
-    private void addImplicitConstructors(ClassNode enumClass, boolean aic) {
+    private static void addImplicitConstructors(ClassNode enumClass, boolean aic) {
         if (aic) {
             ClassNode sn = enumClass.getSuperClass();
             List<ConstructorNode> sctors = new ArrayList<ConstructorNode>(sn.getDeclaredConstructors());
@@ -154,7 +154,7 @@ public class EnumCompletionVisitor extends ClassCodeVisitorSupport {
         return name;
     }
 
-    private boolean isAnonymousInnerClass(ClassNode enumClass) {
+    private static boolean isAnonymousInnerClass(ClassNode enumClass) {
         if (!(enumClass instanceof EnumConstantClassNode)) return false;
         InnerClassNode ic = (InnerClassNode) enumClass;
         return ic.getVariableScope() == null;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/EnumVisitor.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/EnumVisitor.java b/src/main/org/codehaus/groovy/classgen/EnumVisitor.java
index 34fafb9..a1564f0 100644
--- a/src/main/org/codehaus/groovy/classgen/EnumVisitor.java
+++ b/src/main/org/codehaus/groovy/classgen/EnumVisitor.java
@@ -90,7 +90,7 @@ public class EnumVisitor extends ClassCodeVisitorSupport {
         addInit(enumClass, minValue, maxValue, values, isAic);
     }
 
-    private void checkForAbstractMethods(ClassNode enumClass) {
+    private static void checkForAbstractMethods(ClassNode enumClass) {
         List<MethodNode> methods = enumClass.getMethods();
         for (MethodNode m : methods) {
             if (m.isAbstract()) {
@@ -101,7 +101,7 @@ public class EnumVisitor extends ClassCodeVisitorSupport {
         }
     }
 
-    private void addMethods(ClassNode enumClass, FieldNode values) {
+    private static void addMethods(ClassNode enumClass, FieldNode values) {
         List<MethodNode> methods = enumClass.getMethods();
 
         boolean hasNext = false;
@@ -419,7 +419,7 @@ public class EnumVisitor extends ClassCodeVisitorSupport {
         );
     }
 
-    private boolean isAnonymousInnerClass(ClassNode enumClass) {
+    private static boolean isAnonymousInnerClass(ClassNode enumClass) {
         if (!(enumClass instanceof EnumConstantClassNode)) return false;
         InnerClassNode ic = (InnerClassNode) enumClass;
         return ic.getVariableScope() == null;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/ExtendedVerifier.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/ExtendedVerifier.java b/src/main/org/codehaus/groovy/classgen/ExtendedVerifier.java
index ce09b86..14697e6 100644
--- a/src/main/org/codehaus/groovy/classgen/ExtendedVerifier.java
+++ b/src/main/org/codehaus/groovy/classgen/ExtendedVerifier.java
@@ -153,7 +153,7 @@ public class ExtendedVerifier extends ClassCodeVisitorSupport {
         }
     }
 
-    private void visitDeprecation(AnnotatedNode node, AnnotationNode visited) {
+    private static void visitDeprecation(AnnotatedNode node, AnnotationNode visited) {
         if (visited.getClassNode().isResolved() && visited.getClassNode().getName().equals("java.lang.Deprecated")) {
             if (node instanceof MethodNode) {
                 MethodNode mn = (MethodNode) node;
@@ -196,7 +196,7 @@ public class ExtendedVerifier extends ClassCodeVisitorSupport {
         }
     }
 
-    private boolean isOverrideMethod(MethodNode method) {
+    private static boolean isOverrideMethod(MethodNode method) {
         ClassNode cNode = method.getDeclaringClass();
         ClassNode next = cNode;
         outer:
@@ -231,7 +231,7 @@ public class ExtendedVerifier extends ClassCodeVisitorSupport {
         return next != null;
     }
 
-    private MethodNode getDeclaredMethodCorrected(Map genericsSpec, MethodNode mn, ClassNode correctedNext) {
+    private static MethodNode getDeclaredMethodCorrected(Map genericsSpec, MethodNode mn, ClassNode correctedNext) {
         for (MethodNode orig :  correctedNext.getDeclaredMethods(mn.getName())) {
             MethodNode method = correctToGenericsSpec(genericsSpec, orig);
             if (parametersEqual(method.getParameters(), mn.getParameters())) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/InnerClassCompletionVisitor.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/InnerClassCompletionVisitor.java b/src/main/org/codehaus/groovy/classgen/InnerClassCompletionVisitor.java
index 05d9186..bc4cd6b 100644
--- a/src/main/org/codehaus/groovy/classgen/InnerClassCompletionVisitor.java
+++ b/src/main/org/codehaus/groovy/classgen/InnerClassCompletionVisitor.java
@@ -89,15 +89,15 @@ public class InnerClassCompletionVisitor extends InnerClassVisitorHelper impleme
         super.visitConstructor(node);
     }
 
-    private String getTypeDescriptor(ClassNode node, boolean isStatic) {
+    private static String getTypeDescriptor(ClassNode node, boolean isStatic) {
         return BytecodeHelper.getTypeDescription(getClassNode(node, isStatic));
     }
 
-    private String getInternalName(ClassNode node, boolean isStatic) {
+    private static String getInternalName(ClassNode node, boolean isStatic) {
         return BytecodeHelper.getClassInternalName(getClassNode(node, isStatic));
     }
 
-    private void addDispatcherMethods(ClassNode classNode) {
+    private static void addDispatcherMethods(ClassNode classNode) {
         final int objectDistance = getObjectDistance(classNode);
 
         // since we added an anonymous inner class we should also
@@ -302,7 +302,7 @@ public class InnerClassCompletionVisitor extends InnerClassVisitorHelper impleme
         }
     }
 
-    private boolean shouldHandleImplicitThisForInnerClass(ClassNode cn) {
+    private static boolean shouldHandleImplicitThisForInnerClass(ClassNode cn) {
         if (cn.isEnum() || cn.isInterface()) return false;
         if ((cn.getModifiers() & Opcodes.ACC_STATIC) != 0) return false;
         if (!(cn instanceof InnerClassNode)) return false;
@@ -393,7 +393,7 @@ public class InnerClassCompletionVisitor extends InnerClassVisitorHelper impleme
         return namePrefix;
     }
 
-    private ConstructorCallExpression getFirstIfSpecialConstructorCall(BlockStatement code) {
+    private static ConstructorCallExpression getFirstIfSpecialConstructorCall(BlockStatement code) {
         if (code == null) return null;
 
         final List<Statement> statementList = code.getStatements();

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/InnerClassVisitor.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/InnerClassVisitor.java b/src/main/org/codehaus/groovy/classgen/InnerClassVisitor.java
index dff2636..a235f86 100644
--- a/src/main/org/codehaus/groovy/classgen/InnerClassVisitor.java
+++ b/src/main/org/codehaus/groovy/classgen/InnerClassVisitor.java
@@ -100,7 +100,7 @@ public class InnerClassVisitor extends InnerClassVisitorHelper implements Opcode
         processingObjInitStatements = false;
     }
 
-    private boolean shouldHandleImplicitThisForInnerClass(ClassNode cn) {
+    private static boolean shouldHandleImplicitThisForInnerClass(ClassNode cn) {
         if (cn.isEnum() || cn.isInterface()) return false;
         if ((cn.getModifiers() & Opcodes.ACC_STATIC) != 0) return false;
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/VariableScopeVisitor.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/VariableScopeVisitor.java b/src/main/org/codehaus/groovy/classgen/VariableScopeVisitor.java
index bc3a0d4..55d9bdd 100644
--- a/src/main/org/codehaus/groovy/classgen/VariableScopeVisitor.java
+++ b/src/main/org/codehaus/groovy/classgen/VariableScopeVisitor.java
@@ -179,7 +179,7 @@ public class VariableScopeVisitor extends ClassCodeVisitorSupport {
         return findClassMember(cn.getOuterClass(), name);
     }
 
-    private String getPropertyName(MethodNode m) {
+    private static String getPropertyName(MethodNode m) {
         String name = m.getName();
         if (!(name.startsWith("set") || name.startsWith("get"))) return null;
         String pname = name.substring(3);

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/Verifier.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/Verifier.java b/src/main/org/codehaus/groovy/classgen/Verifier.java
index bd540e4..e907d96 100644
--- a/src/main/org/codehaus/groovy/classgen/Verifier.java
+++ b/src/main/org/codehaus/groovy/classgen/Verifier.java
@@ -116,7 +116,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
         return methodNode;
     }
 
-    private FieldNode setMetaClassFieldIfNotExists(ClassNode node, FieldNode metaClassField) {
+    private static FieldNode setMetaClassFieldIfNotExists(ClassNode node, FieldNode metaClassField) {
         if (metaClassField != null) return metaClassField;
         final String classInternalName = BytecodeHelper.getClassInternalName(node);
         metaClassField =
@@ -130,7 +130,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
         return metaClassField;
     }
 
-    private FieldNode getMetaClassField(ClassNode node) {
+    private static FieldNode getMetaClassField(ClassNode node) {
         FieldNode ret = node.getDeclaredField("metaClass");
         if (ret != null) {
             ClassNode mcFieldType = ret.getType();
@@ -238,7 +238,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
         };
     }
 
-    private void checkForDuplicateMethods(ClassNode cn) {
+    private static void checkForDuplicateMethods(ClassNode cn) {
         HashSet<String> descriptors = new HashSet<String>();
         for (MethodNode mn : cn.getMethods()) {
             if (mn.isSynthetic()) continue;
@@ -256,14 +256,14 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
         }
     }
 
-    private String scriptBodySignatureWithoutReturnType(ClassNode cn) {
+    private static String scriptBodySignatureWithoutReturnType(ClassNode cn) {
         for (MethodNode mn : cn.getMethods()) {
             if (mn.isScriptBody()) return makeDescriptorWithoutReturnType(mn);
         }
         return null;
     }
 
-    private FieldNode checkFieldDoesNotExist(ClassNode node, String fieldName) {
+    private static FieldNode checkFieldDoesNotExist(ClassNode node, String fieldName) {
         FieldNode ret = node.getDeclaredField(fieldName);
         if (ret != null) {
             if (    Modifier.isPublic(ret.getModifiers()) &&
@@ -277,7 +277,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
         return null;
     }
 
-    private void addFastPathHelperFieldsAndHelperMethod(ClassNode node, final String classInternalName, boolean knownSpecialCase) {
+    private static void addFastPathHelperFieldsAndHelperMethod(ClassNode node, final String classInternalName, boolean knownSpecialCase) {
         if (node.getNodeMetaData(ClassNodeSkip.class)!=null) return;
         FieldNode stMCB = checkFieldDoesNotExist(node,STATIC_METACLASS_BOOL);
         if (stMCB==null) {
@@ -524,7 +524,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
     protected void addTimeStamp(ClassNode node) {
     }
 
-    private void checkReturnInObjectInitializer(List init) {
+    private static void checkReturnInObjectInitializer(List init) {
         CodeVisitorSupport cvs = new CodeVisitorSupport() {
             @Override
             public void visitClosureExpression(ClosureExpression expression) {
@@ -595,7 +595,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
         if (statement != null) statement.visit(new VerifierCodeVisitor(this));
     }
 
-    private void adjustTypesIfStaticMainMethod(MethodNode node) {
+    private static void adjustTypesIfStaticMainMethod(MethodNode node) {
         if (node.getName().equals("main") && node.isStatic()) {
             Parameter[] params = node.getParameters();
             if (params.length == 1) {
@@ -1030,7 +1030,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
         return null;
     }
 
-    private boolean extractImplicitThis$0StmtIfInnerClassFromExpression(final List<Statement> stmts, final Statement bstmt) {
+    private static boolean extractImplicitThis$0StmtIfInnerClassFromExpression(final List<Statement> stmts, final Statement bstmt) {
         Expression expr = ((ExpressionStatement) bstmt).getExpression();
         if (expr instanceof BinaryExpression) {
             Expression lExpr = ((BinaryExpression) expr).getLeftExpression();
@@ -1044,7 +1044,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
         return false;
     }
 
-    private ConstructorCallExpression getFirstIfSpecialConstructorCall(Statement code) {
+    private static ConstructorCallExpression getFirstIfSpecialConstructorCall(Statement code) {
         if (code == null || !(code instanceof ExpressionStatement)) return null;
 
         Expression expression = ((ExpressionStatement) code).getExpression();
@@ -1220,7 +1220,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
         }
     }
 
-    private void collectSuperInterfaceMethods(ClassNode cn, Map<String, MethodNode> allInterfaceMethods) {
+    private static void collectSuperInterfaceMethods(ClassNode cn, Map<String, MethodNode> allInterfaceMethods) {
         List cnInterfaces = Arrays.asList(cn.getInterfaces());
         ClassNode sn = cn.getSuperClass();
         while (sn != null && !sn.equals(ClassHelper.OBJECT_TYPE)) {
@@ -1398,7 +1398,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
         return node.equals(testNode);
     }
 
-    private Parameter[] cleanParameters(Parameter[] parameters) {
+    private static Parameter[] cleanParameters(Parameter[] parameters) {
         Parameter[] params = new Parameter[parameters.length];
         for (int i = 0; i < params.length; i++) {
             params[i] = new Parameter(cleanType(parameters[i].getType()), parameters[i].getName());
@@ -1422,7 +1422,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
         }
     }
 
-    private boolean equalParametersNormal(MethodNode m1, MethodNode m2) {
+    private static boolean equalParametersNormal(MethodNode m1, MethodNode m2) {
         Parameter[] p1 = m1.getParameters();
         Parameter[] p2 = m2.getParameters();
         if (p1.length != p2.length) return false;
@@ -1434,7 +1434,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
         return true;
     }
 
-    private boolean equalParametersWithGenerics(MethodNode m1, MethodNode m2, Map genericsSpec) {
+    private static boolean equalParametersWithGenerics(MethodNode m1, MethodNode m2, Map genericsSpec) {
         Parameter[] p1 = m1.getParameters();
         Parameter[] p2 = m2.getParameters();
         if (p1.length != p2.length) return false;
@@ -1447,7 +1447,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
         return true;
     }
 
-    private boolean moveOptimizedConstantsInitialization(final ClassNode node) {
+    private static boolean moveOptimizedConstantsInitialization(final ClassNode node) {
         if (node.isInterface() && !Traits.isTrait(node)) return false;
 
         final int mods = Opcodes.ACC_STATIC|Opcodes.ACC_SYNTHETIC| Opcodes.ACC_PUBLIC;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/asm/BinaryExpressionMultiTypeDispatcher.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/asm/BinaryExpressionMultiTypeDispatcher.java b/src/main/org/codehaus/groovy/classgen/asm/BinaryExpressionMultiTypeDispatcher.java
index ce59e09..98358d7 100644
--- a/src/main/org/codehaus/groovy/classgen/asm/BinaryExpressionMultiTypeDispatcher.java
+++ b/src/main/org/codehaus/groovy/classgen/asm/BinaryExpressionMultiTypeDispatcher.java
@@ -104,7 +104,7 @@ public class BinaryExpressionMultiTypeDispatcher extends BinaryExpressionHelper
         super(wc);
     }
 
-    private int getOperandConversionType(ClassNode leftType, ClassNode rightType) {
+    private static int getOperandConversionType(ClassNode leftType, ClassNode rightType) {
         if (isIntCategory(leftType) && isIntCategory(rightType)) return 1;
         if (isLongCategory(leftType) && isLongCategory(rightType)) return 2;
         if (isBigDecCategory(leftType) && isBigDecCategory(rightType)) return 0;
@@ -230,13 +230,13 @@ public class BinaryExpressionMultiTypeDispatcher extends BinaryExpressionHelper
         return isNumberCategory(type);
     }
 
-    private boolean isShiftOperation(int operation) {
+    private static boolean isShiftOperation(int operation) {
         return  operation==LEFT_SHIFT   || 
                 operation==RIGHT_SHIFT  ||
                 operation==RIGHT_SHIFT_UNSIGNED;
     }
 
-    private boolean isAssignmentToArray(BinaryExpression binExp) {
+    private static boolean isAssignmentToArray(BinaryExpression binExp) {
         Expression leftExpression = binExp.getLeftExpression();
         if (!(leftExpression instanceof BinaryExpression)) return false;
         BinaryExpression leftBinExpr = (BinaryExpression) leftExpression;
@@ -244,7 +244,7 @@ public class BinaryExpressionMultiTypeDispatcher extends BinaryExpressionHelper
         return true;
     }
     
-    private int removeAssignment(int op) {
+    private static int removeAssignment(int op) {
         switch (op) {
             case PLUS_EQUAL: return PLUS;
             case MINUS_EQUAL: return MINUS;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/asm/ClosureWriter.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/asm/ClosureWriter.java b/src/main/org/codehaus/groovy/classgen/asm/ClosureWriter.java
index 3baf374..93a7fe7 100644
--- a/src/main/org/codehaus/groovy/classgen/asm/ClosureWriter.java
+++ b/src/main/org/codehaus/groovy/classgen/asm/ClosureWriter.java
@@ -297,7 +297,7 @@ public class ClosureWriter {
         return answer;
     }
 
-    private void correctAccessedVariable(final InnerClassNode closureClass, ClosureExpression ce) {
+    private static void correctAccessedVariable(final InnerClassNode closureClass, ClosureExpression ce) {
         CodeVisitorSupport visitor = new CodeVisitorSupport() {
             @Override
             public void visitVariableExpression(VariableExpression expression) {
@@ -321,7 +321,7 @@ public class ClosureWriter {
      * same method, in this case the constructor. A closure should not
      * have more than one constructor!
      */
-    private void removeInitialValues(Parameter[] params) {
+    private static void removeInitialValues(Parameter[] params) {
         for (int i = 0; i < params.length; i++) {
             if (params[i].hasInitialExpression()) {
                 Parameter p = new Parameter(params[i].getType(), params[i].getName());

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/asm/CompileStack.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/asm/CompileStack.java b/src/main/org/codehaus/groovy/classgen/asm/CompileStack.java
index bae9a51..be216ee 100644
--- a/src/main/org/codehaus/groovy/classgen/asm/CompileStack.java
+++ b/src/main/org/codehaus/groovy/classgen/asm/CompileStack.java
@@ -632,7 +632,7 @@ public class CompileStack implements Opcodes {
         mv.visitVarInsn(ASTORE, reference.getIndex());
     }
 
-    private void pushInitValue(ClassNode type, MethodVisitor mv) {
+    private static void pushInitValue(ClassNode type, MethodVisitor mv) {
         if (ClassHelper.isPrimitiveType(type)) {
             if (type==ClassHelper.long_TYPE) {
                 mv.visitInsn(LCONST_0);

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/asm/InvocationWriter.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/asm/InvocationWriter.java b/src/main/org/codehaus/groovy/classgen/asm/InvocationWriter.java
index cbacce1..0f215d6 100644
--- a/src/main/org/codehaus/groovy/classgen/asm/InvocationWriter.java
+++ b/src/main/org/codehaus/groovy/classgen/asm/InvocationWriter.java
@@ -632,7 +632,7 @@ public class InvocationWriter {
         }
     }
 
-    private List<ConstructorNode> sortConstructors(ConstructorCallExpression call, ClassNode callNode) {
+    private static List<ConstructorNode> sortConstructors(ConstructorCallExpression call, ClassNode callNode) {
         // sort in a new list to prevent side effects
         List<ConstructorNode> constructors = new ArrayList<ConstructorNode>(callNode.getDeclaredConstructors());
         Comparator comp = new Comparator() {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/asm/MopWriter.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/asm/MopWriter.java b/src/main/org/codehaus/groovy/classgen/asm/MopWriter.java
index 98d5f33..3b3f980 100644
--- a/src/main/org/codehaus/groovy/classgen/asm/MopWriter.java
+++ b/src/main/org/codehaus/groovy/classgen/asm/MopWriter.java
@@ -83,7 +83,7 @@ public class MopWriter {
         visitMopMethodList(classNode.getSuperClass().getAllDeclaredMethods(), false, currentClassSignatures);
     }
 
-    private Set<MopKey> buildCurrentClassSignatureSet(List<MethodNode> methods) {
+    private static Set<MopKey> buildCurrentClassSignatureSet(List<MethodNode> methods) {
         if (methods.isEmpty()) return Collections.EMPTY_SET;
         HashSet<MopKey> result = new HashSet<MopKey>(methods.size());
         for (MethodNode mn : methods) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/asm/OperandStack.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/asm/OperandStack.java b/src/main/org/codehaus/groovy/classgen/asm/OperandStack.java
index 88ffd51..152f854 100644
--- a/src/main/org/codehaus/groovy/classgen/asm/OperandStack.java
+++ b/src/main/org/codehaus/groovy/classgen/asm/OperandStack.java
@@ -76,7 +76,7 @@ public class OperandStack {
     /**
      * returns true for long and double
      */
-    private boolean isTwoSlotType(ClassNode type) {
+    private static boolean isTwoSlotType(ClassNode type) {
         return type==ClassHelper.long_TYPE || type==ClassHelper.double_TYPE;
     }
 
@@ -122,7 +122,7 @@ public class OperandStack {
      * convert primitive (not boolean) to boolean or byte.
      * type needs to be a primitive type (not checked) 
      */
-    private void primitive2b(MethodVisitor mv, ClassNode type) {
+    private static void primitive2b(MethodVisitor mv, ClassNode type) {
         Label trueLabel = new Label();
         Label falseLabel = new Label();
         // for the various types we make first a 
@@ -505,7 +505,7 @@ public class OperandStack {
         if (boxing) box(); 
     }
 
-    private void pushPrimitiveConstant(final MethodVisitor mv, final Object value, final ClassNode type) {
+    private static void pushPrimitiveConstant(final MethodVisitor mv, final Object value, final ClassNode type) {
         boolean isInt = ClassHelper.int_TYPE.equals(type);
         boolean isShort = ClassHelper.short_TYPE.equals(type);
         boolean isByte = ClassHelper.byte_TYPE.equals(type);

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/asm/indy/InvokeDynamicWriter.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/asm/indy/InvokeDynamicWriter.java b/src/main/org/codehaus/groovy/classgen/asm/indy/InvokeDynamicWriter.java
index a5be513..82cb2bc 100644
--- a/src/main/org/codehaus/groovy/classgen/asm/indy/InvokeDynamicWriter.java
+++ b/src/main/org/codehaus/groovy/classgen/asm/indy/InvokeDynamicWriter.java
@@ -157,7 +157,7 @@ public class InvokeDynamicWriter extends InvocationWriter {
         finishIndyCall(BSM, callSiteName, sig, numberOfArguments, methodName, flags);
     }
     
-    private int getMethodCallFlags(MethodCallerMultiAdapter adapter, boolean safe, boolean spread) {
+    private static int getMethodCallFlags(MethodCallerMultiAdapter adapter, boolean safe, boolean spread) {
         int ret = 0;
         if (safe)                           ret |= SAFE_NAVIGATION;
         if (adapter==invokeMethodOnCurrent) ret |= THIS_CALL;
@@ -170,7 +170,7 @@ public class InvokeDynamicWriter extends InvocationWriter {
         makeIndyCall(invokeMethod, receiver, false, false, message, arguments);
     }
 
-    private int getPropertyFlags(boolean safe, boolean implicitThis, boolean groovyObject) {
+    private static int getPropertyFlags(boolean safe, boolean implicitThis, boolean groovyObject) {
         int flags = 0;
         if (implicitThis)   flags |= IMPLICIT_THIS;
         if (groovyObject)   flags |= GROOVY_OBJECT;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/asm/sc/StaticInvocationWriter.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/asm/sc/StaticInvocationWriter.java b/src/main/org/codehaus/groovy/classgen/asm/sc/StaticInvocationWriter.java
index 95903ea..b301e74 100644
--- a/src/main/org/codehaus/groovy/classgen/asm/sc/StaticInvocationWriter.java
+++ b/src/main/org/codehaus/groovy/classgen/asm/sc/StaticInvocationWriter.java
@@ -413,7 +413,7 @@ public class StaticInvocationWriter extends InvocationWriter {
         }
     }
 
-    private boolean isNullConstant(final Expression expression) {
+    private static boolean isNullConstant(final Expression expression) {
         return (expression instanceof ConstantExpression && ((ConstantExpression) expression).getValue() == null);
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/classgen/asm/sc/StaticTypesClosureWriter.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/asm/sc/StaticTypesClosureWriter.java b/src/main/org/codehaus/groovy/classgen/asm/sc/StaticTypesClosureWriter.java
index 8ac7ab8..48e3d87 100644
--- a/src/main/org/codehaus/groovy/classgen/asm/sc/StaticTypesClosureWriter.java
+++ b/src/main/org/codehaus/groovy/classgen/asm/sc/StaticTypesClosureWriter.java
@@ -73,7 +73,7 @@ public class StaticTypesClosureWriter extends ClosureWriter {
         return closureClass;
     }
 
-    private void createDirectCallMethod(final ClassNode closureClass, final MethodNode doCallMethod) {
+    private static void createDirectCallMethod(final ClassNode closureClass, final MethodNode doCallMethod) {
         // in case there is no "call" method on the closure, we can create a "fast invocation" paths
         // to avoid going through ClosureMetaClass by call(Object...) method
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/control/AnnotationConstantsVisitor.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/control/AnnotationConstantsVisitor.java b/src/main/org/codehaus/groovy/control/AnnotationConstantsVisitor.java
index 94d447d..b1610df 100644
--- a/src/main/org/codehaus/groovy/control/AnnotationConstantsVisitor.java
+++ b/src/main/org/codehaus/groovy/control/AnnotationConstantsVisitor.java
@@ -54,7 +54,7 @@ public class AnnotationConstantsVisitor extends ClassCodeVisitorSupport {
         visitStatement(node.getFirstStatement(), node.getReturnType());
     }
 
-    private void visitStatement(Statement statement, ClassNode returnType) {
+    private static void visitStatement(Statement statement, ClassNode returnType) {
         if (statement instanceof ReturnStatement) {
             // normal path
             ReturnStatement rs = (ReturnStatement) statement;
@@ -66,7 +66,7 @@ public class AnnotationConstantsVisitor extends ClassCodeVisitorSupport {
         }
     }
 
-    private Expression transformConstantExpression(Expression val, ClassNode returnType) {
+    private static Expression transformConstantExpression(Expression val, ClassNode returnType) {
         ClassNode returnWrapperType = ClassHelper.getWrapper(returnType);
         if (val instanceof ConstantExpression) {
             Expression result = revertType(val, returnWrapperType);
@@ -92,7 +92,7 @@ public class AnnotationConstantsVisitor extends ClassCodeVisitorSupport {
         return val;
     }
 
-    private Expression revertType(Expression val, ClassNode returnWrapperType) {
+    private static Expression revertType(Expression val, ClassNode returnWrapperType) {
         ConstantExpression ce = (ConstantExpression) val;
         if (ClassHelper.Character_TYPE.equals(returnWrapperType) && ClassHelper.STRING_TYPE.equals(val.getType())) {
             return configure(val, Verifier.transformToPrimitiveConstantIfPossible((ConstantExpression) val));
@@ -122,7 +122,7 @@ public class AnnotationConstantsVisitor extends ClassCodeVisitorSupport {
         return null;
     }
 
-    private Expression configure(Expression orig, Expression result) {
+    private static Expression configure(Expression orig, Expression result) {
         result.setSourcePosition(orig);
         return result;
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/control/ClassNodeResolver.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/control/ClassNodeResolver.java b/src/main/org/codehaus/groovy/control/ClassNodeResolver.java
index 025c419..44d42bb 100644
--- a/src/main/org/codehaus/groovy/control/ClassNodeResolver.java
+++ b/src/main/org/codehaus/groovy/control/ClassNodeResolver.java
@@ -204,7 +204,7 @@ public class ClassNodeResolver {
     /**
      * Search for classes using class loading
      */
-    private LookupResult findByClassLoading(String name, CompilationUnit compilationUnit, GroovyClassLoader loader) {
+    private static LookupResult findByClassLoading(String name, CompilationUnit compilationUnit, GroovyClassLoader loader) {
         Class cls;
         try {
             // NOTE: it's important to do no lookup against script files
@@ -279,7 +279,7 @@ public class ClassNodeResolver {
     /**
      * try to find a script using the compilation unit class loader.
      */
-    private LookupResult tryAsScript(String name, CompilationUnit compilationUnit, ClassNode oldClass) {
+    private static LookupResult tryAsScript(String name, CompilationUnit compilationUnit, ClassNode oldClass) {
         LookupResult lr = null;
         if (oldClass!=null) {
             lr = new LookupResult(null, oldClass);
@@ -308,7 +308,7 @@ public class ClassNodeResolver {
      * get the time stamp of a class
      * NOTE: copied from GroovyClassLoader
      */
-    private long getTimeStamp(ClassNode cls) {
+    private static long getTimeStamp(ClassNode cls) {
         if (!(cls instanceof DecompiledClassNode)) {
             return Verifier.getTimestamp(cls.getTypeClass());
         }
@@ -320,7 +320,7 @@ public class ClassNodeResolver {
      * returns true if the source in URL is newer than the class
      * NOTE: copied from GroovyClassLoader
      */
-    private boolean isSourceNewer(URL source, ClassNode cls) {
+    private static boolean isSourceNewer(URL source, ClassNode cls) {
         try {
             long lastMod;
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/control/CompilationUnit.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/control/CompilationUnit.java b/src/main/org/codehaus/groovy/control/CompilationUnit.java
index 2f80369..de53c5b 100644
--- a/src/main/org/codehaus/groovy/control/CompilationUnit.java
+++ b/src/main/org/codehaus/groovy/control/CompilationUnit.java
@@ -965,7 +965,7 @@ public class CompilationUnit extends ProcessingUnit {
         public abstract void call(GroovyClass gclass) throws CompilationFailedException;
     }
 
-    private int getSuperClassCount(ClassNode element) {
+    private static int getSuperClassCount(ClassNode element) {
         int count = 0;
         while (element != null) {
             count++;
@@ -1014,7 +1014,7 @@ public class CompilationUnit extends ProcessingUnit {
         return sorted;
     }
 
-    private List<ClassNode> getSorted(int[] index, List<ClassNode> unsorted) {
+    private static List<ClassNode> getSorted(int[] index, List<ClassNode> unsorted) {
         List<ClassNode> sorted = new ArrayList<ClassNode>(unsorted.size());
         for (int i = 0; i < unsorted.size(); i++) {
             int min = -1;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/control/CompilerConfiguration.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/control/CompilerConfiguration.java b/src/main/org/codehaus/groovy/control/CompilerConfiguration.java
index b1eada5..8a31dee 100644
--- a/src/main/org/codehaus/groovy/control/CompilerConfiguration.java
+++ b/src/main/org/codehaus/groovy/control/CompilerConfiguration.java
@@ -237,7 +237,7 @@ public class CompilerConfiguration {
      * @param key the name of the system property.
      * @return value of the system property or null
      */
-    private String safeGetSystemProperty(String key){
+    private static String safeGetSystemProperty(String key){
         return safeGetSystemProperty(key, null);
     }
 
@@ -253,7 +253,7 @@ public class CompilerConfiguration {
      * @param def a default value.
      * @return  value of the system property or null
      */
-    private String safeGetSystemProperty(String key, String def){
+    private static String safeGetSystemProperty(String key, String def){
         try {
             return System.getProperty(key, def);
         } catch (SecurityException t){

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/control/GenericsVisitor.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/control/GenericsVisitor.java b/src/main/org/codehaus/groovy/control/GenericsVisitor.java
index c38e79b..7cdf9fd 100644
--- a/src/main/org/codehaus/groovy/control/GenericsVisitor.java
+++ b/src/main/org/codehaus/groovy/control/GenericsVisitor.java
@@ -115,7 +115,7 @@ public class GenericsVisitor extends ClassCodeVisitorSupport {
         }
     }
     
-    private String getPrintName(GenericsType gt) {
+    private static String getPrintName(GenericsType gt) {
         String ret = gt.getName();
         ClassNode[] upperBounds = gt.getUpperBounds();
         ClassNode lowerBound = gt.getLowerBound();
@@ -132,7 +132,7 @@ public class GenericsVisitor extends ClassCodeVisitorSupport {
 
     }
     
-    private String getPrintName(ClassNode cn) {
+    private static String getPrintName(ClassNode cn) {
         String ret = cn.getName();
         GenericsType[] gts = cn.getGenericsTypes();
         if (gts!=null) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/control/ResolveVisitor.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/control/ResolveVisitor.java b/src/main/org/codehaus/groovy/control/ResolveVisitor.java
index e8228e1..02f1b73 100644
--- a/src/main/org/codehaus/groovy/control/ResolveVisitor.java
+++ b/src/main/org/codehaus/groovy/control/ResolveVisitor.java
@@ -389,7 +389,7 @@ public class ResolveVisitor extends ClassCodeExpressionTransformer {
         return false;
     }
 
-    private String replaceLastPoint(String name) {
+    private static String replaceLastPoint(String name) {
         int lastPoint = name.lastIndexOf('.');
         name = new StringBuffer()
                 .append(name.substring(0, lastPoint))
@@ -714,7 +714,7 @@ public class ResolveVisitor extends ClassCodeExpressionTransformer {
         return ret;
     }
 
-    private String lookupClassName(PropertyExpression pe) {
+    private static String lookupClassName(PropertyExpression pe) {
         boolean doInitialClassTest=true;
         String name = "";
         // this loop builds a name from right to left each name part
@@ -776,7 +776,7 @@ public class ResolveVisitor extends ClassCodeExpressionTransformer {
     // this check will ignore a .class property, for Example Integer.class will be
     // a PropertyExpression with the ClassExpression of Integer as objectExpression
     // and class as property
-    private Expression correctClassClassChain(PropertyExpression pe) {
+    private static Expression correctClassClassChain(PropertyExpression pe) {
         LinkedList<Expression> stack = new LinkedList<Expression>();
         ClassExpression found = null;
         for (Expression it = pe; it != null; it = ((PropertyExpression) it).getObjectExpression()) {
@@ -945,12 +945,12 @@ public class ResolveVisitor extends ClassCodeExpressionTransformer {
         return ve;
     }
 
-    private boolean testVanillaNameForClass(String name) {
+    private static boolean testVanillaNameForClass(String name) {
         if (name==null || name.length()==0) return false;
         return !Character.isLowerCase(name.charAt(0));
     }
 
-    private boolean isLeftSquareBracket(int op) {
+    private static boolean isLeftSquareBracket(int op) {
         return op == Types.ARRAY_EXPRESSION
                 || op == Types.LEFT_SQUARE_BRACKET
                 || op == Types.SYNTH_LIST
@@ -1060,7 +1060,7 @@ public class ResolveVisitor extends ClassCodeExpressionTransformer {
         return ret;
     }
 
-    private String getDescription(ClassNode node) {
+    private static String getDescription(ClassNode node) {
         return (node.isInterface() ? "interface" : "class") + " '" + node.getName() + "'";
     }
     


Mime
View raw message