groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwagenleit...@apache.org
Subject [2/4] groovy git commit: make private methods static when they are plain functions (closes #290)
Date Thu, 28 Apr 2016 00:06:17 GMT
http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/control/SourceUnit.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/control/SourceUnit.java b/src/main/org/codehaus/groovy/control/SourceUnit.java
index d61d58f..66950f4 100644
--- a/src/main/org/codehaus/groovy/control/SourceUnit.java
+++ b/src/main/org/codehaus/groovy/control/SourceUnit.java
@@ -288,7 +288,7 @@ public class SourceUnit extends ProcessingUnit {
         }
     }
 
-    private void saveAsXML(String name, ModuleNode ast) {
+    private static void saveAsXML(String name, ModuleNode ast) {
         XStreamUtils.serialize(name, ast);
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/control/StaticImportVisitor.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/control/StaticImportVisitor.java b/src/main/org/codehaus/groovy/control/StaticImportVisitor.java
index b179a9a..84b8156 100644
--- a/src/main/org/codehaus/groovy/control/StaticImportVisitor.java
+++ b/src/main/org/codehaus/groovy/control/StaticImportVisitor.java
@@ -186,7 +186,7 @@ public class StaticImportVisitor extends ClassCodeExpressionTransformer {
      * @param toSet resulting node
      * @param origNode original node
      */
-    private void setSourcePosition(Expression toSet, Expression origNode) {
+    private static void setSourcePosition(Expression toSet, Expression origNode) {
         toSet.setSourcePosition(origNode);
         if (toSet instanceof PropertyExpression) {
             ((PropertyExpression) toSet).getProperty().setSourcePosition(origNode);
@@ -217,7 +217,7 @@ public class StaticImportVisitor extends ClassCodeExpressionTransformer {
         return exp;
     }
 
-    private Expression findConstant(FieldNode fn) {
+    private static Expression findConstant(FieldNode fn) {
         if (fn != null && !fn.isEnum() && fn.isStatic() && fn.isFinal()) {
             if (fn.getInitialValueExpression() instanceof ConstantExpression) {
                 return fn.getInitialValueExpression();
@@ -469,18 +469,18 @@ public class StaticImportVisitor extends ClassCodeExpressionTransformer {
         return null;
     }
 
-    private String prefix(String name) {
+    private static String prefix(String name) {
         return name.startsWith("is") ? "is" : name.substring(0, 3);
     }
 
-    private String getPropNameForAccessor(String fieldName) {
+    private static String getPropNameForAccessor(String fieldName) {
         int prefixLength = fieldName.startsWith("is") ? 2 : 3;
         if (fieldName.length() < prefixLength + 1) return fieldName;
         if (!validPropName(fieldName)) return fieldName;
         return String.valueOf(fieldName.charAt(prefixLength)).toLowerCase() + fieldName.substring(prefixLength + 1);
     }
 
-    private boolean validPropName(String propName) {
+    private static boolean validPropName(String propName) {
         return propName.startsWith("get") || propName.startsWith("is") || propName.startsWith("set");
     }
 
@@ -509,7 +509,7 @@ public class StaticImportVisitor extends ClassCodeExpressionTransformer {
         return accessor;
     }
 
-    private boolean hasStaticProperty(ClassNode staticImportType, String propName) {
+    private static boolean hasStaticProperty(ClassNode staticImportType, String propName) {
         ClassNode classNode = staticImportType;
         while (classNode != null) {
             for (PropertyNode pn : classNode.getProperties()) {
@@ -527,7 +527,7 @@ public class StaticImportVisitor extends ClassCodeExpressionTransformer {
         return findStaticMethod(staticImportType, accessorMethodName, (inLeftExpression ? dummyArgs : ArgumentListExpression.EMPTY_ARGUMENTS));
     }
 
-    private Expression findStaticField(ClassNode staticImportType, String fieldName) {
+    private static Expression findStaticField(ClassNode staticImportType, String fieldName) {
         if (staticImportType.isPrimaryClassNode() || staticImportType.isResolved()) {
             FieldNode field = staticImportType.getField(fieldName);
             if (field != null && field.isStatic())
@@ -536,7 +536,7 @@ public class StaticImportVisitor extends ClassCodeExpressionTransformer {
         return null;
     }
 
-    private Expression findStaticMethod(ClassNode staticImportType, String methodName, Expression args) {
+    private static Expression findStaticMethod(ClassNode staticImportType, String methodName, Expression args) {
         if (staticImportType.isPrimaryClassNode() || staticImportType.isResolved()) {
             if (staticImportType.hasPossibleStaticMethod(methodName, args)) {
                 return new StaticMethodCallExpression(staticImportType, methodName, args);

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/control/StaticVerifier.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/control/StaticVerifier.java b/src/main/org/codehaus/groovy/control/StaticVerifier.java
index 731fe54..1cb8e49 100644
--- a/src/main/org/codehaus/groovy/control/StaticVerifier.java
+++ b/src/main/org/codehaus/groovy/control/StaticVerifier.java
@@ -163,7 +163,7 @@ public class StaticVerifier extends ClassCodeVisitorSupport {
                 "' but left out brackets in a place not allowed by the grammar.", ve);
     }
 
-    private FieldNode getDeclaredOrInheritedField(ClassNode cn, String fieldName) {
+    private static FieldNode getDeclaredOrInheritedField(ClassNode cn, String fieldName) {
         ClassNode node = cn;
         while (node != null) {
             FieldNode fn = node.getDeclaredField(fieldName);

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/control/customizers/SecureASTCustomizer.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/control/customizers/SecureASTCustomizer.java b/src/main/org/codehaus/groovy/control/customizers/SecureASTCustomizer.java
index 6911651..a05d899 100644
--- a/src/main/org/codehaus/groovy/control/customizers/SecureASTCustomizer.java
+++ b/src/main/org/codehaus/groovy/control/customizers/SecureASTCustomizer.java
@@ -577,7 +577,7 @@ public class SecureASTCustomizer extends CompilationCustomizer {
         if (!methods.isEmpty()) throw new SecurityException("Method definitions are not allowed");
     }
     
-    private List<MethodNode> filterMethods(ClassNode owner) {
+    private static List<MethodNode> filterMethods(ClassNode owner) {
         List<MethodNode> result = new LinkedList<MethodNode>();
         List<MethodNode> methods = owner.getMethods();
         for (MethodNode method : methods) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/control/customizers/builder/SourceAwareCustomizerFactory.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/control/customizers/builder/SourceAwareCustomizerFactory.java b/src/main/org/codehaus/groovy/control/customizers/builder/SourceAwareCustomizerFactory.java
index 9541ac7..d0fc541 100644
--- a/src/main/org/codehaus/groovy/control/customizers/builder/SourceAwareCustomizerFactory.java
+++ b/src/main/org/codehaus/groovy/control/customizers/builder/SourceAwareCustomizerFactory.java
@@ -109,7 +109,7 @@ public class SourceAwareCustomizerFactory extends AbstractFactory implements Pos
         return sourceAwareCustomizer;
     }
 
-    private void addExtensionValidator(final SourceAwareCustomizer sourceAwareCustomizer, final SourceOptions data) {
+    private static void addExtensionValidator(final SourceAwareCustomizer sourceAwareCustomizer, final SourceOptions data) {
         final List<String> extensions = data.extensions!=null?data.extensions : new LinkedList<String>();
         if (data.extension!=null) extensions.add(data.extension);
         Closure<Boolean> extensionValidator = data.extensionValidator;
@@ -125,7 +125,7 @@ public class SourceAwareCustomizerFactory extends AbstractFactory implements Pos
         sourceAwareCustomizer.setExtensionValidator(extensionValidator);
     }
 
-    private void addBasenameValidator(final SourceAwareCustomizer sourceAwareCustomizer, final SourceOptions data) {
+    private static void addBasenameValidator(final SourceAwareCustomizer sourceAwareCustomizer, final SourceOptions data) {
         final List<String> basenames = data.basenames!=null?data.basenames : new LinkedList<String>();
         if (data.basename!=null) basenames.add(data.basename);
         Closure<Boolean> basenameValidator = data.basenameValidator;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/reflection/CachedMethod.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/reflection/CachedMethod.java b/src/main/org/codehaus/groovy/reflection/CachedMethod.java
index cff72f2..ff3176a 100644
--- a/src/main/org/codehaus/groovy/reflection/CachedMethod.java
+++ b/src/main/org/codehaus/groovy/reflection/CachedMethod.java
@@ -216,7 +216,7 @@ public class CachedMethod extends MetaMethod implements Comparable {
         return cachedMethod.toString();
     }
     
-    private Constructor getConstructor(SoftReference<Constructor> ref) {
+    private static Constructor getConstructor(SoftReference<Constructor> ref) {
         if (ref==null) return null;
         return ref.get();
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/reflection/ClassInfo.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/reflection/ClassInfo.java b/src/main/org/codehaus/groovy/reflection/ClassInfo.java
index 44a50db..2c0d8f4 100644
--- a/src/main/org/codehaus/groovy/reflection/ClassInfo.java
+++ b/src/main/org/codehaus/groovy/reflection/ClassInfo.java
@@ -233,7 +233,7 @@ public class ClassInfo {
         return answer;
     }
     
-    private boolean isValidWeakMetaClass(MetaClass metaClass) {
+    private static boolean isValidWeakMetaClass(MetaClass metaClass) {
         return isValidWeakMetaClass(metaClass, GroovySystem.getMetaClassRegistry().getMetaClassCreationHandler());
     }
 
@@ -241,7 +241,7 @@ public class ClassInfo {
      * if EMC.enableGlobally() is OFF, return whatever the cached answer is.
      * but if EMC.enableGlobally() is ON and the cached answer is not an EMC, come up with a fresh answer
      */
-    private boolean isValidWeakMetaClass(MetaClass metaClass, MetaClassRegistry.MetaClassCreationHandle mccHandle) {
+    private static boolean isValidWeakMetaClass(MetaClass metaClass, MetaClassRegistry.MetaClassCreationHandle mccHandle) {
         if(metaClass==null) return false;
         boolean enableGloballyOn = (mccHandle instanceof ExpandoMetaClassCreationHandle);
         boolean cachedAnswerIsEMC = (metaClass instanceof ExpandoMetaClass);

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/reflection/MixinInMetaClass.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/reflection/MixinInMetaClass.java b/src/main/org/codehaus/groovy/reflection/MixinInMetaClass.java
index 7e5c2e7..2f58d5c 100644
--- a/src/main/org/codehaus/groovy/reflection/MixinInMetaClass.java
+++ b/src/main/org/codehaus/groovy/reflection/MixinInMetaClass.java
@@ -54,7 +54,7 @@ public class MixinInMetaClass extends ManagedConcurrentMap {
         emc.addMixinClass(this);
     }
 
-    private CachedConstructor findDefaultConstructor(CachedClass mixinClass) {
+    private static CachedConstructor findDefaultConstructor(CachedClass mixinClass) {
         for (CachedConstructor constr : mixinClass.getConstructors()) {
             if (!Modifier.isPublic(constr.getModifiers()))
                 continue;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/reflection/ParameterTypes.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/reflection/ParameterTypes.java b/src/main/org/codehaus/groovy/reflection/ParameterTypes.java
index cf95b5d..7f56fe1 100644
--- a/src/main/org/codehaus/groovy/reflection/ParameterTypes.java
+++ b/src/main/org/codehaus/groovy/reflection/ParameterTypes.java
@@ -250,7 +250,7 @@ public class ParameterTypes
         return false;
     }
 
-    private boolean isValidExactMethod(Class[] arguments, CachedClass[] pt) {
+    private static boolean isValidExactMethod(Class[] arguments, CachedClass[] pt) {
         // lets check the parameter types match
         int size = pt.length;
         for (int i = 0; i < size; i++) {
@@ -297,7 +297,7 @@ public class ParameterTypes
         return MetaClassHelper.isAssignableFrom(toTestAgainst, component);
     }
 
-    private boolean isValidVarargsMethod(Class[] arguments, int size, CachedClass[] pt, int paramMinus1) {
+    private static boolean isValidVarargsMethod(Class[] arguments, int size, CachedClass[] pt, int paramMinus1) {
         // first check normal number of parameters
         for (int i = 0; i < paramMinus1; i++) {
             if (pt[i].isAssignableFrom(arguments[i])) continue;
@@ -369,7 +369,7 @@ public class ParameterTypes
         return false;
     }
 
-    private Class getArgClass(Object arg) {
+    private static Class getArgClass(Object arg) {
         Class cls;
         if (arg == null) {
             cls = null;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/runtime/ProxyGeneratorAdapter.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/ProxyGeneratorAdapter.java b/src/main/org/codehaus/groovy/runtime/ProxyGeneratorAdapter.java
index dbbab01..9b7deb9 100644
--- a/src/main/org/codehaus/groovy/runtime/ProxyGeneratorAdapter.java
+++ b/src/main/org/codehaus/groovy/runtime/ProxyGeneratorAdapter.java
@@ -235,7 +235,7 @@ public class ProxyGeneratorAdapter extends ClassVisitor implements Opcodes {
         return result;
     }
 
-    private void collectTraits(final Class clazz, final Set<ClassNode> traits) {
+    private static void collectTraits(final Class clazz, final Set<ClassNode> traits) {
         Annotation annotation = clazz.getAnnotation(Trait.class);
         if (annotation!=null) {
             ClassNode trait = ClassHelper.make(clazz);
@@ -631,7 +631,7 @@ public class ProxyGeneratorAdapter extends ClassVisitor implements Opcodes {
         return null;
     }
 
-    private int registerLen(Type[] args) {
+    private static int registerLen(Type[] args) {
         int i = 0;
         for (Type arg : args) {
             i += registerLen(arg);
@@ -639,7 +639,7 @@ public class ProxyGeneratorAdapter extends ClassVisitor implements Opcodes {
         return i;
     }
 
-    private int registerLen(final Type arg) {
+    private static int registerLen(final Type arg) {
         return arg== Type.DOUBLE_TYPE||arg==Type.LONG_TYPE?2:1;
     }
 
@@ -695,7 +695,7 @@ public class ProxyGeneratorAdapter extends ClassVisitor implements Opcodes {
         mv.visitFieldInsn(PUTFIELD, proxyName, DELEGATE_OBJECT_FIELD, BytecodeHelper.getTypeDescription(delegateClass));
     }
 
-    private int getTypeArgsRegisterLength(Type[] args)  {
+    private static int getTypeArgsRegisterLength(Type[] args)  {
         int length = 0;
         for (Type type : args)  { length += registerLen(type); }
         return length;
@@ -800,7 +800,7 @@ public class ProxyGeneratorAdapter extends ClassVisitor implements Opcodes {
         return null;
     }
 
-    private void unwrapResult(final MethodVisitor mv, final String desc) {
+    private static void unwrapResult(final MethodVisitor mv, final String desc) {
         Type returnType = Type.getReturnType(desc);
         if (returnType==Type.VOID_TYPE) {
             mv.visitInsn(POP);
@@ -894,7 +894,7 @@ public class ProxyGeneratorAdapter extends ClassVisitor implements Opcodes {
         return ARETURN;
     }
 
-    private boolean isPrimitive(final Type arg) {
+    private static boolean isPrimitive(final Type arg) {
         return arg == Type.BOOLEAN_TYPE
                 || arg == Type.BYTE_TYPE
                 || arg == Type.CHAR_TYPE
@@ -905,7 +905,7 @@ public class ProxyGeneratorAdapter extends ClassVisitor implements Opcodes {
                 || arg == Type.SHORT_TYPE;
     }
 
-    private String getWrappedClassDescriptor(Type type) {
+    private static String getWrappedClassDescriptor(Type type) {
         if (type == Type.BOOLEAN_TYPE) return "java/lang/Boolean";
         if (type == Type.BYTE_TYPE) return "java/lang/Byte";
         if (type == Type.CHAR_TYPE) return "java/lang/Character";

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/runtime/m12n/SimpleExtensionModule.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/m12n/SimpleExtensionModule.java b/src/main/org/codehaus/groovy/runtime/m12n/SimpleExtensionModule.java
index 77e58ac..af5df54 100644
--- a/src/main/org/codehaus/groovy/runtime/m12n/SimpleExtensionModule.java
+++ b/src/main/org/codehaus/groovy/runtime/m12n/SimpleExtensionModule.java
@@ -115,7 +115,7 @@ public abstract class SimpleExtensionModule extends ExtensionModule {
         return metaMethods;
     }
 
-    private void createMetaMethods(final Class extensionClass, final List<MetaMethod> metaMethods, final boolean isStatic) {
+    private static void createMetaMethods(final Class extensionClass, final List<MetaMethod> metaMethods, final boolean isStatic) {
         CachedClass cachedClass = ReflectionCache.getCachedClass(extensionClass);
         CachedMethod[] methods = cachedClass.getMethods();
         for (CachedMethod method : methods) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/runtime/metaclass/ClosureMetaClass.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/metaclass/ClosureMetaClass.java b/src/main/org/codehaus/groovy/runtime/metaclass/ClosureMetaClass.java
index 84c1eb0..19febc6 100644
--- a/src/main/org/codehaus/groovy/runtime/metaclass/ClosureMetaClass.java
+++ b/src/main/org/codehaus/groovy/runtime/metaclass/ClosureMetaClass.java
@@ -200,7 +200,7 @@ public final class ClosureMetaClass extends MetaClassImpl {
         return CLOSURE_METACLASS.getMetaProperty(name);
     }
 
-    private void unwrap(Object[] arguments) {
+    private static void unwrap(Object[] arguments) {
         for (int i = 0; i != arguments.length; i++) {
             if (arguments[i] instanceof Wrapper) {
                 arguments[i] = ((Wrapper) arguments[i]).unwrap();
@@ -402,12 +402,12 @@ public final class ClosureMetaClass extends MetaClassImpl {
         throw new MissingMethodException(methodName, theClass, arguments, false);
     }
 
-    private boolean isInternalMethod(String methodName) {
+    private static boolean isInternalMethod(String methodName) {
         return methodName.equals("curry") || methodName.equals("ncurry") || methodName.equals("rcurry") ||
                 methodName.equals("leftShift") || methodName.equals("rightShift");
     }
 
-    private Object[] makeArguments(Object[] arguments, String methodName) {
+    private static Object[] makeArguments(Object[] arguments, String methodName) {
         if (arguments == null) return EMPTY_ARGUMENTS;
         return arguments;
     }
@@ -419,7 +419,7 @@ public final class ClosureMetaClass extends MetaClassImpl {
         return th;
     }
 
-    private Object invokeOnDelegationObjects(
+    private static Object invokeOnDelegationObjects(
             boolean invoke1, Object o1,
             boolean invoke2, Object o2,
             String methodName, Object[] args) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java b/src/main/org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java
index 22136de..bfd58e9 100644
--- a/src/main/org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java
+++ b/src/main/org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java
@@ -260,7 +260,7 @@ public class ConcurrentReaderHashMap
    * Returns the appropriate capacity (power of two) for the specified 
    * initial capacity argument.
    */
-  private int p2capacity(int initialCapacity) {
+  private static int p2capacity(int initialCapacity) {
     int cap = initialCapacity;
     
     // Compute the appropriate capacity

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java b/src/main/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
index db39ffc..09ba116 100644
--- a/src/main/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
+++ b/src/main/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
@@ -143,7 +143,7 @@ public class MetaClassRegistryImpl implements MetaClassRegistry{
         });
    }
 
-    private void refreshMopMethods(final Map<CachedClass, List<MetaMethod>> map) {
+    private static void refreshMopMethods(final Map<CachedClass, List<MetaMethod>> map) {
         for (Map.Entry<CachedClass, List<MetaMethod>> e : map.entrySet()) {
             CachedClass cls = e.getKey();
             cls.setNewMopMethods(e.getValue());

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/runtime/metaclass/MetaMethodIndex.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/metaclass/MetaMethodIndex.java b/src/main/org/codehaus/groovy/runtime/metaclass/MetaMethodIndex.java
index 965c3e0..fc32607 100644
--- a/src/main/org/codehaus/groovy/runtime/metaclass/MetaMethodIndex.java
+++ b/src/main/org/codehaus/groovy/runtime/metaclass/MetaMethodIndex.java
@@ -437,7 +437,7 @@ public class MetaMethodIndex {
         return o;
     }
 
-    private boolean isNonRealMethod(MetaMethod method) {
+    private static boolean isNonRealMethod(MetaMethod method) {
         return method instanceof NewInstanceMetaMethod ||
                 method instanceof NewStaticMetaMethod ||
                 method instanceof ClosureMetaMethod ||
@@ -447,7 +447,7 @@ public class MetaMethodIndex {
                 method instanceof ClosureMetaMethod.AnonymousMetaMethod;
     }
 
-    private boolean isMatchingMethod(MetaMethod aMethod, MetaMethod method) {
+    private static boolean isMatchingMethod(MetaMethod aMethod, MetaMethod method) {
         if (aMethod==method) return true;
         CachedClass[] params1 = aMethod.getParameterTypes();
         CachedClass[] params2 = method.getParameterTypes();
@@ -465,7 +465,7 @@ public class MetaMethodIndex {
         return matches;
     }
 
-    private int findMatchingMethod(FastArray list, MetaMethod method) {
+    private static int findMatchingMethod(FastArray list, MetaMethod method) {
         int len = list.size();
         Object data[] = list.getArray();
         for (int j = 0; j != len; ++j) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/runtime/metaclass/MethodSelectionException.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/metaclass/MethodSelectionException.java b/src/main/org/codehaus/groovy/runtime/metaclass/MethodSelectionException.java
index b824f5d..a9f5538 100644
--- a/src/main/org/codehaus/groovy/runtime/metaclass/MethodSelectionException.java
+++ b/src/main/org/codehaus/groovy/runtime/metaclass/MethodSelectionException.java
@@ -64,7 +64,7 @@ public class MethodSelectionException extends GroovyRuntimeException {
     }
     
     
-    private void appendClassNames(StringBuilder argBuf, Class[] classes) {
+    private static void appendClassNames(StringBuilder argBuf, Class[] classes) {
         argBuf.append("(");
         for (int i = 0; i < classes.length; i++) {
             if (i > 0) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/runtime/powerassert/SourceText.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/powerassert/SourceText.java b/src/main/org/codehaus/groovy/runtime/powerassert/SourceText.java
index 25b7a4b..dbdc78b 100644
--- a/src/main/org/codehaus/groovy/runtime/powerassert/SourceText.java
+++ b/src/main/org/codehaus/groovy/runtime/powerassert/SourceText.java
@@ -109,7 +109,7 @@ public class SourceText {
         return textOffsets.get(deltaLine) + deltaColumn;
     }
 
-    private boolean hasPlausibleSourcePosition(ASTNode node) {
+    private static boolean hasPlausibleSourcePosition(ASTNode node) {
         return node.getLineNumber() > 0
                 && node.getColumnNumber() > 0
                 && node.getLastLineNumber() >= node.getLineNumber()
@@ -117,7 +117,7 @@ public class SourceText {
                 (node.getLineNumber() == node.getLastLineNumber() ? node.getColumnNumber() : 0);
     }
 
-    private int countLeadingWhitespace(String lineText) {
+    private static int countLeadingWhitespace(String lineText) {
         int result = 0;
         while (result < lineText.length() && Character.isWhitespace(lineText.charAt(result)))
             result++;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/tools/LoaderConfiguration.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/tools/LoaderConfiguration.java b/src/main/org/codehaus/groovy/tools/LoaderConfiguration.java
index 56ee2ca..ffcb8da 100644
--- a/src/main/org/codehaus/groovy/tools/LoaderConfiguration.java
+++ b/src/main/org/codehaus/groovy/tools/LoaderConfiguration.java
@@ -144,7 +144,7 @@ public class LoaderConfiguration {
     /*
     * Expands the properties inside the given string to it's values.
     */
-    private String assignProperties(String str) {
+    private static String assignProperties(String str) {
         int propertyIndexStart = 0, propertyIndexEnd = 0;
         boolean requireProperty;
         String result = "";
@@ -196,7 +196,7 @@ public class LoaderConfiguration {
     }
 
 
-    private String correctDoubleSlash(String propertyValue, int propertyIndexEnd, String str) {
+    private static String correctDoubleSlash(String propertyValue, int propertyIndexEnd, String str) {
         int index = propertyIndexEnd + 1;
         if (index < str.length() && str.charAt(index) == '/' &&
                 propertyValue.endsWith("/") &&
@@ -255,7 +255,7 @@ public class LoaderConfiguration {
 
     // change path representation to something more system independent.
     // This solution is based on an absolute path
-    private String getSlashyPath(final String path) {
+    private static String getSlashyPath(final String path) {
         String changedPath = path;
         if (File.separatorChar != '/')
             changedPath = changedPath.replace(File.separatorChar, '/');

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/tools/javac/JavaStubGenerator.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/tools/javac/JavaStubGenerator.java b/src/main/org/codehaus/groovy/tools/javac/JavaStubGenerator.java
index 135e1ed..0418922 100644
--- a/src/main/org/codehaus/groovy/tools/javac/JavaStubGenerator.java
+++ b/src/main/org/codehaus/groovy/tools/javac/JavaStubGenerator.java
@@ -77,7 +77,7 @@ public class JavaStubGenerator {
         this(outputPath, false, false, Charset.defaultCharset().name());
     }
 
-    private void mkdirs(File parent, String relativeFile) {
+    private static void mkdirs(File parent, String relativeFile) {
         int index = relativeFile.lastIndexOf('/');
         if (index == -1) return;
         File dir = new File(parent, relativeFile.substring(0, index));
@@ -367,7 +367,7 @@ public class JavaStubGenerator {
         }
     }
 
-    private void printEnumFields(PrintWriter out, List<FieldNode> fields) {
+    private static void printEnumFields(PrintWriter out, List<FieldNode> fields) {
         if (!fields.isEmpty()) {
             boolean first = true;
             for (FieldNode field : fields) {
@@ -427,15 +427,15 @@ public class JavaStubGenerator {
         out.println(";");
     }
 
-    private String formatChar(String ch) {
+    private static String formatChar(String ch) {
         return "'" + escapeSpecialChars("" + ch.charAt(0)) + "'";
     }
 
-    private String formatString(String s) {
+    private static String formatString(String s) {
         return "\"" + escapeSpecialChars(s) + "\"";
     }
 
-    private ConstructorCallExpression getConstructorCallExpression(ConstructorNode constructorNode) {
+    private static ConstructorCallExpression getConstructorCallExpression(ConstructorNode constructorNode) {
         Statement code = constructorNode.getCode();
         if (!(code instanceof BlockStatement))
             return null;
@@ -478,7 +478,7 @@ public class JavaStubGenerator {
         }
     }
 
-    private Parameter[] selectAccessibleConstructorFromSuper(ConstructorNode node) {
+    private static Parameter[] selectAccessibleConstructorFromSuper(ConstructorNode node) {
         ClassNode type = node.getDeclaringClass();
         ClassNode superType = type.getUnresolvedSuperClass();
 
@@ -506,7 +506,7 @@ public class JavaStubGenerator {
         return null;
     }
 
-    private boolean noExceptionToAvoid(ConstructorNode fromStub, ConstructorNode fromSuper) {
+    private static boolean noExceptionToAvoid(ConstructorNode fromStub, ConstructorNode fromSuper) {
         ClassNode[] superExceptions = fromSuper.getExceptions();
         if (superExceptions==null || superExceptions.length==0) return true;
 
@@ -584,7 +584,7 @@ public class JavaStubGenerator {
         out.println(");");
     }
 
-    private ClassNode getConstructorArgumentType(Expression arg, ConstructorNode node) {
+    private static ClassNode getConstructorArgumentType(Expression arg, ConstructorNode node) {
         if (!(arg instanceof VariableExpression)) return arg.getType();
         VariableExpression vexp = (VariableExpression) arg;
         String name = vexp.getName();
@@ -664,7 +664,7 @@ public class JavaStubGenerator {
         }
     }
 
-    private boolean isAbstract(final MethodNode methodNode) {
+    private static boolean isAbstract(final MethodNode methodNode) {
         if (isDefaultTraitImpl(methodNode)) {
             return false;
         }
@@ -674,11 +674,11 @@ public class JavaStubGenerator {
         return false;
     }
 
-    private boolean isDefaultTraitImpl(final MethodNode methodNode) {
+    private static boolean isDefaultTraitImpl(final MethodNode methodNode) {
         return Traits.isTrait(methodNode.getDeclaringClass()) && Traits.hasDefaultImplementation(methodNode);
     }
 
-    private void printValue(PrintWriter out, Expression re, boolean assumeClass) {
+    private static void printValue(PrintWriter out, Expression re, boolean assumeClass) {
         if (assumeClass) {
             if (re.getType().getName().equals("groovy.lang.Closure")) {
                 out.print("groovy.lang.Closure.class");
@@ -790,7 +790,7 @@ public class JavaStubGenerator {
         }
     }
 
-    private void printGenericsBounds(PrintWriter out, GenericsType[] genericsTypes) {
+    private static void printGenericsBounds(PrintWriter out, GenericsType[] genericsTypes) {
         if (genericsTypes == null || genericsTypes.length == 0) return;
         out.print('<');
         for (int i = 0; i < genericsTypes.length; i++) {
@@ -887,7 +887,7 @@ public class JavaStubGenerator {
         return val;
     }
 
-    private void printModifiers(PrintWriter out, int modifiers) {
+    private static void printModifiers(PrintWriter out, int modifiers) {
         if ((modifiers & Opcodes.ACC_PUBLIC) != 0)
             out.print("public ");
 
@@ -910,7 +910,7 @@ public class JavaStubGenerator {
             out.print("abstract ");
     }
 
-    private void printImports(PrintWriter out, ClassNode classNode) {
+    private static void printImports(PrintWriter out, ClassNode classNode) {
         List<String> imports = new ArrayList<String>();
 
         ModuleNode moduleNode = classNode.getModule();

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/tools/javac/JavacJavaCompiler.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/tools/javac/JavacJavaCompiler.java b/src/main/org/codehaus/groovy/tools/javac/JavacJavaCompiler.java
index 606dd67..873b7e6 100644
--- a/src/main/org/codehaus/groovy/tools/javac/JavacJavaCompiler.java
+++ b/src/main/org/codehaus/groovy/tools/javac/JavacJavaCompiler.java
@@ -81,7 +81,7 @@ public class JavacJavaCompiler implements JavaCompiler {
         }
     }
 
-    private void addJavacError(String header, CompilationUnit cu, StringWriter msg) {
+    private static void addJavacError(String header, CompilationUnit cu, StringWriter msg) {
         if (msg != null) {
             header = header + "\n" + msg.getBuffer().toString();
         } else {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/transform/sc/StaticCompilationVisitor.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/transform/sc/StaticCompilationVisitor.java b/src/main/org/codehaus/groovy/transform/sc/StaticCompilationVisitor.java
index 99bebf2..db99dbc 100644
--- a/src/main/org/codehaus/groovy/transform/sc/StaticCompilationVisitor.java
+++ b/src/main/org/codehaus/groovy/transform/sc/StaticCompilationVisitor.java
@@ -169,7 +169,7 @@ public class StaticCompilationVisitor extends StaticTypeCheckingVisitor {
      * Adds special accessors and mutators for private fields so that inner classes can get/set them
      */
     @SuppressWarnings("unchecked")
-    private void addPrivateFieldsAccessors(ClassNode node) {
+    private static void addPrivateFieldsAccessors(ClassNode node) {
         Set<ASTNode> accessedFields = (Set<ASTNode>) node.getNodeMetaData(StaticTypesMarker.PV_FIELDS_ACCESS);
         Set<ASTNode> mutatedFields = (Set<ASTNode>) node.getNodeMetaData(StaticTypesMarker.PV_FIELDS_MUTATION);
         if (accessedFields == null && mutatedFields == null) return;
@@ -224,7 +224,7 @@ public class StaticCompilationVisitor extends StaticTypeCheckingVisitor {
      * @param node an inner/outer class node for which to generate bridge methods
      */
     @SuppressWarnings("unchecked")
-    private void addPrivateBridgeMethods(final ClassNode node) {
+    private static void addPrivateBridgeMethods(final ClassNode node) {
         Set<ASTNode> accessedMethods = (Set<ASTNode>) node.getNodeMetaData(StaticTypesMarker.PV_METHODS_ACCESS);
         if (accessedMethods==null) return;
         List<MethodNode> methods = new ArrayList<MethodNode>(node.getAllDeclaredMethods());
@@ -299,7 +299,7 @@ public class StaticCompilationVisitor extends StaticTypeCheckingVisitor {
         return genericTypeTokens;
     }
 
-    private void memorizeInitialExpressions(final MethodNode node) {
+    private static void memorizeInitialExpressions(final MethodNode node) {
         // add node metadata for default parameters because they are erased by the Verifier
         if (node.getParameters()!=null) {
             for (Parameter parameter : node.getParameters()) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/transform/sc/transformers/BinaryExpressionTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/transform/sc/transformers/BinaryExpressionTransformer.java b/src/main/org/codehaus/groovy/transform/sc/transformers/BinaryExpressionTransformer.java
index 96f61c8..3460292 100644
--- a/src/main/org/codehaus/groovy/transform/sc/transformers/BinaryExpressionTransformer.java
+++ b/src/main/org/codehaus/groovy/transform/sc/transformers/BinaryExpressionTransformer.java
@@ -248,7 +248,7 @@ public class BinaryExpressionTransformer {
         return staticCompilationTransformer.superTransform(bin);
     }
 
-    private BinaryExpression tryOptimizeCharComparison(final Expression left, final Expression right, final BinaryExpression bin) {
+    private static BinaryExpression tryOptimizeCharComparison(final Expression left, final Expression right, final BinaryExpression bin) {
         int op = bin.getOperation().getType();
         if (isCompareToBoolean(op) || op == COMPARE_EQUAL || op == COMPARE_NOT_EQUAL) {
             Character cLeft = tryCharConstant(left);
@@ -266,7 +266,7 @@ public class BinaryExpressionTransformer {
         return null;
     }
 
-    private Character tryCharConstant(final Expression expr) {
+    private static Character tryCharConstant(final Expression expr) {
         if (expr instanceof ConstantExpression) {
             ConstantExpression ce = (ConstantExpression) expr;
             if (ClassHelper.STRING_TYPE.equals(ce.getType())) {
@@ -279,7 +279,7 @@ public class BinaryExpressionTransformer {
         return null;
     }
 
-    private Expression transformDeclarationExpression(final BinaryExpression bin) {
+    private static Expression transformDeclarationExpression(final BinaryExpression bin) {
         Expression leftExpression = bin.getLeftExpression();
         if (leftExpression instanceof VariableExpression) {
             if (ClassHelper.char_TYPE.equals(((VariableExpression) leftExpression).getOriginType())) {
@@ -321,7 +321,7 @@ public class BinaryExpressionTransformer {
         return staticCompilationTransformer.transform(tExp);
     }
 
-    private DeclarationExpression optimizeConstantInitialization(
+    private static DeclarationExpression optimizeConstantInitialization(
             final BinaryExpression originalDeclaration,
             final Token operation,
             final ConstantExpression constant,

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/transform/sc/transformers/CastExpressionOptimizer.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/transform/sc/transformers/CastExpressionOptimizer.java b/src/main/org/codehaus/groovy/transform/sc/transformers/CastExpressionOptimizer.java
index 30e20bb..59cd92e 100644
--- a/src/main/org/codehaus/groovy/transform/sc/transformers/CastExpressionOptimizer.java
+++ b/src/main/org/codehaus/groovy/transform/sc/transformers/CastExpressionOptimizer.java
@@ -68,7 +68,7 @@ public class CastExpressionOptimizer {
         return transformer.superTransform(cast);
     }
 
-    private boolean isOptimizable(final ClassNode exprInferredType, final ClassNode castType) {
+    private static boolean isOptimizable(final ClassNode exprInferredType, final ClassNode castType) {
         if (StaticTypeCheckingSupport.implementsInterfaceOrIsSubclassOf(exprInferredType, castType)) {
             return true;
         }

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/transform/sc/transformers/MethodCallExpressionTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/transform/sc/transformers/MethodCallExpressionTransformer.java b/src/main/org/codehaus/groovy/transform/sc/transformers/MethodCallExpressionTransformer.java
index 982865f..2833483 100644
--- a/src/main/org/codehaus/groovy/transform/sc/transformers/MethodCallExpressionTransformer.java
+++ b/src/main/org/codehaus/groovy/transform/sc/transformers/MethodCallExpressionTransformer.java
@@ -133,7 +133,7 @@ public class MethodCallExpressionTransformer {
         return staticCompilationTransformer.superTransform(expr);
     }
 
-    private MethodCallExpression transformToMopSuperCall(final ClassNode superCallReceiver, final MethodCallExpression expr) {
+    private static MethodCallExpression transformToMopSuperCall(final ClassNode superCallReceiver, final MethodCallExpression expr) {
         MethodNode mn = expr.getNodeMetaData(StaticTypesMarker.DIRECT_METHOD_CALL_TARGET);
         String mopName = MopWriter.getMopMethodName(mn, false);
         MethodNode direct = new MethodNode(
@@ -158,7 +158,7 @@ public class MethodCallExpressionTransformer {
         return result;
     }
 
-    private boolean isCallOnClosure(final MethodCallExpression expr) {
+    private static boolean isCallOnClosure(final MethodCallExpression expr) {
         return expr.isImplicitThis()
                 && expr.getNodeMetaData(StaticTypesMarker.DIRECT_METHOD_CALL_TARGET) == StaticTypeCheckingVisitor.CLOSURE_CALL_VARGS
                 && !"call".equals(expr.getMethodAsString());

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/transform/sc/transformers/VariableExpressionTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/transform/sc/transformers/VariableExpressionTransformer.java b/src/main/org/codehaus/groovy/transform/sc/transformers/VariableExpressionTransformer.java
index 84e25eb..a613147 100644
--- a/src/main/org/codehaus/groovy/transform/sc/transformers/VariableExpressionTransformer.java
+++ b/src/main/org/codehaus/groovy/transform/sc/transformers/VariableExpressionTransformer.java
@@ -45,7 +45,7 @@ public class VariableExpressionTransformer {
         return expr;
     }
 
-    private Expression tryTransformDelegateToProperty(VariableExpression expr) {
+    private static Expression tryTransformDelegateToProperty(VariableExpression expr) {
         // we need to transform variable expressions that go to a delegate
         // to a property expression, as ACG would loose the information
         // in processClassVariable before it reaches any makeCall, that could
@@ -64,7 +64,7 @@ public class VariableExpressionTransformer {
         return pexp;
     }
 
-    private Expression tryTransformPrivateFieldAccess(VariableExpression expr) {
+    private static Expression tryTransformPrivateFieldAccess(VariableExpression expr) {
         FieldNode field = expr.getNodeMetaData(StaticTypesMarker.PV_FIELDS_ACCESS);
         if (field == null) {
             field = expr.getNodeMetaData(StaticTypesMarker.PV_FIELDS_MUTATION);

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/transform/stc/AbstractTypeCheckingExtension.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/transform/stc/AbstractTypeCheckingExtension.java b/src/main/org/codehaus/groovy/transform/stc/AbstractTypeCheckingExtension.java
index ef59461..c6c5cc7 100644
--- a/src/main/org/codehaus/groovy/transform/stc/AbstractTypeCheckingExtension.java
+++ b/src/main/org/codehaus/groovy/transform/stc/AbstractTypeCheckingExtension.java
@@ -202,7 +202,7 @@ public class AbstractTypeCheckingExtension extends TypeCheckingExtension {
         return match;
     }
 
-    private boolean matchWithOrWithourBoxing(final ClassNode argType, final Class aClass) {
+    private static boolean matchWithOrWithourBoxing(final ClassNode argType, final Class aClass) {
         final boolean match;
         ClassNode type = ClassHelper.make(aClass);
         if (ClassHelper.isPrimitiveType(type) && !ClassHelper.isPrimitiveType(argType)) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java b/src/main/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java
index 4a130bd..ae86961 100644
--- a/src/main/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java
+++ b/src/main/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java
@@ -331,7 +331,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
     }
 
     @SuppressWarnings("unchecked")
-    private void addPrivateFieldOrMethodAccess(Expression source, ClassNode cn, StaticTypesMarker type, ASTNode accessedMember) {
+    private static void addPrivateFieldOrMethodAccess(Expression source, ClassNode cn, StaticTypesMarker type, ASTNode accessedMember) {
         Set<ASTNode> set = (Set<ASTNode>) cn.getNodeMetaData(type);
         if (set==null) {
             set = new LinkedHashSet<ASTNode>();
@@ -398,7 +398,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
     /**
      * wrap type in Class&lt;&gt; if usingClass==true
      */
-    private ClassNode makeType(ClassNode cn, boolean usingClass) {
+    private static ClassNode makeType(ClassNode cn, boolean usingClass) {
         if (usingClass) {
             ClassNode clazzType = CLASS_Type.getPlainNodeReference();
             clazzType.setGenericsTypes(new GenericsType[] {new GenericsType(cn)});
@@ -867,7 +867,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
         return true;
     }
 
-    private ClassNode adjustTypeForSpreading(ClassNode inferredRightExpressionType, Expression leftExpression) {
+    private static ClassNode adjustTypeForSpreading(ClassNode inferredRightExpressionType, Expression leftExpression) {
         // imagine we have: list*.foo = 100
         // then the assignment must be checked against [100], not 100
         ClassNode wrappedRHS = inferredRightExpressionType;
@@ -2016,7 +2016,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
         }
     }
 
-    private ClassNode wrapClosureType(final ClassNode returnType) {
+    private static ClassNode wrapClosureType(final ClassNode returnType) {
         ClassNode inferredType = CLOSURE_TYPE.getPlainNodeReference();
         inferredType.setGenericsTypes(new GenericsType[]{new GenericsType(wrapTypeIfNecessary(returnType))});
         return inferredType;
@@ -2755,7 +2755,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
         }
     }
 
-    private void doAddDelegateReceiver(final List<Receiver<String>> receivers, final StringBuilder path, final ClassNode delegate) {
+    private static void doAddDelegateReceiver(final List<Receiver<String>> receivers, final StringBuilder path, final ClassNode delegate) {
         receivers.add(new Receiver<String>(delegate, path.toString()));
         if (isTraitHelper(delegate)) {
             receivers.add(new Receiver<String>(delegate.getOuterClass(), path.toString()));
@@ -3037,7 +3037,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
      *@param args the arguments of the method call
      * @param returnType the original return type, as inferred by the type checker   @return fixed return type if the selected method is {@link org.codehaus.groovy.runtime.DefaultGroovyMethods#withTraits(Object, Class[]) withTraits}
      */
-    private ClassNode adjustWithTraits(final MethodNode directMethodCallCandidate, final ClassNode receiver, final ClassNode[] args, final ClassNode returnType) {
+    private static ClassNode adjustWithTraits(final MethodNode directMethodCallCandidate, final ClassNode receiver, final ClassNode[] args, final ClassNode returnType) {
         if (directMethodCallCandidate instanceof ExtensionMethodNode) {
             ExtensionMethodNode emn = (ExtensionMethodNode) directMethodCallCandidate;
             if ("withTraits".equals(emn.getName()) && "DefaultGroovyMethods".equals(emn.getExtensionMethodNode().getDeclaringClass().getNameWithoutPackage())) {
@@ -3062,7 +3062,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
      * @param name  the name of the method
      * @param args the argument classes
      */
-    private void addArrayMethods(List<MethodNode> methods, ClassNode receiver, String name, ClassNode[] args) {
+    private static void addArrayMethods(List<MethodNode> methods, ClassNode receiver, String name, ClassNode[] args) {
         if (args.length!=1) return;
         if (!receiver.isArray()) return;
         if (!isIntCategory(getUnwrapper(args[0]))) return;
@@ -3133,7 +3133,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
         return owners;
     }
 
-    private void addSelfTypes(final ClassNode receiver, final List<Receiver<String>> owners) {
+    private static void addSelfTypes(final ClassNode receiver, final List<Receiver<String>> owners) {
         LinkedHashSet<ClassNode> selfTypes = new LinkedHashSet<ClassNode>();
         for (ClassNode selfType : Traits.collectSelfTypes(receiver, selfTypes)) {
             owners.add(Receiver.<String>make(selfType));
@@ -3568,7 +3568,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
         return null;
     }
 
-    private ClassNode inferSAMTypeGenericsInAssignment(ClassNode samUsage, MethodNode sam, ClassNode closureType, ClosureExpression closureExpression) {
+    private static ClassNode inferSAMTypeGenericsInAssignment(ClassNode samUsage, MethodNode sam, ClassNode closureType, ClosureExpression closureExpression) {
         // if the sam type or closure type do not provide generics information, 
         // we cannot infer anything, thus we simply return the provided samUsage
         GenericsType[] samGt = samUsage.getGenericsTypes();
@@ -3727,7 +3727,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
         return result;
     }
 
-    private List<MethodNode> addGeneratedMethods(final ClassNode receiver, final List<MethodNode> methods) {
+    private static List<MethodNode> addGeneratedMethods(final ClassNode receiver, final List<MethodNode> methods) {
         // using a comparator of parameters
         List<MethodNode> result = new LinkedList<MethodNode>();
         for (MethodNode method : methods) {
@@ -4094,7 +4094,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
         return ret;
     }
 
-    private ClassNode makeSelf(ClassNode trait) {
+    private static ClassNode makeSelf(ClassNode trait) {
         ClassNode ret = trait;
         LinkedHashSet<ClassNode> selfTypes = new LinkedHashSet<ClassNode>();
         Traits.collectSelfTypes(ret, selfTypes);
@@ -4300,7 +4300,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
         return applyGenericsContext(resolvedPlaceholders, returnType);
     }
 
-    private void resolvePlaceholdersFromExplicitTypeHints(final MethodNode method, final GenericsType[] explicitTypeHints, final Map<String, GenericsType> resolvedPlaceholders) {
+    private static void resolvePlaceholdersFromExplicitTypeHints(final MethodNode method, final GenericsType[] explicitTypeHints, final Map<String, GenericsType> resolvedPlaceholders) {
         if (explicitTypeHints!=null) {
             GenericsType[] methodGenericTypes = method.getGenericsTypes();
             if (methodGenericTypes!=null && methodGenericTypes.length==explicitTypeHints.length) {
@@ -4313,7 +4313,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
         }
     }
 
-    private void extractGenericsConnectionsForSuperClassAndInterfaces(final Map<String, GenericsType> resolvedPlaceholders, final Map<String, GenericsType> connections) {
+    private static void extractGenericsConnectionsForSuperClassAndInterfaces(final Map<String, GenericsType> resolvedPlaceholders, final Map<String, GenericsType> connections) {
         for (GenericsType value : new HashSet<GenericsType>(connections.values())) {
             if (!value.isPlaceholder() && !value.isWildcard()) {
                 ClassNode valueType = value.getType();
@@ -4553,7 +4553,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
         return true;
     }
 
-    private String toMethodGenericTypesString(MethodNode node) {
+    private static String toMethodGenericTypesString(MethodNode node) {
         GenericsType[] genericsTypes = node.getGenericsTypes();
         if (genericsTypes ==null) return "";
         StringBuilder sb = new StringBuilder("<");
@@ -4582,11 +4582,11 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
         return sb.toString();
     }
 
-    private void putSetterInfo(Expression exp, SetterInfo info) {
+    private static void putSetterInfo(Expression exp, SetterInfo info) {
         exp.putNodeMetaData(SetterInfo.class, info);
     }
 
-    private SetterInfo removeSetterInfo(Expression exp) {
+    private static SetterInfo removeSetterInfo(Expression exp) {
         Object nodeMetaData = exp.getNodeMetaData(SetterInfo.class);
         if (nodeMetaData!=null) {
             exp.removeNodeMetaData(SetterInfo.class);

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/transform/stc/TraitTypeCheckingExtension.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/transform/stc/TraitTypeCheckingExtension.java b/src/main/org/codehaus/groovy/transform/stc/TraitTypeCheckingExtension.java
index 3ccb7f4..1ba75f4 100644
--- a/src/main/org/codehaus/groovy/transform/stc/TraitTypeCheckingExtension.java
+++ b/src/main/org/codehaus/groovy/transform/stc/TraitTypeCheckingExtension.java
@@ -100,11 +100,11 @@ public class TraitTypeCheckingExtension extends AbstractTypeCheckingExtension {
         return NOTFOUND;
     }
 
-    private boolean isStaticTraitReceiver(final ClassNode receiver, final VariableExpression var) {
+    private static boolean isStaticTraitReceiver(final ClassNode receiver, final VariableExpression var) {
         return Traits.STATIC_THIS_OBJECT.equals(var.getName()) && isClassClassNodeWrappingConcreteType(receiver);
     }
 
-    private boolean isThisTraitReceiver(final VariableExpression var) {
+    private static boolean isThisTraitReceiver(final VariableExpression var) {
         return Traits.THIS_OBJECT.equals(var.getName());
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/transform/trait/NAryOperationRewriter.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/transform/trait/NAryOperationRewriter.java b/src/main/org/codehaus/groovy/transform/trait/NAryOperationRewriter.java
index e923a4e..53d5488 100644
--- a/src/main/org/codehaus/groovy/transform/trait/NAryOperationRewriter.java
+++ b/src/main/org/codehaus/groovy/transform/trait/NAryOperationRewriter.java
@@ -127,7 +127,7 @@ class NAryOperationRewriter extends ClassCodeExpressionTransformer {
         return result;
     }
 
-    private int getOperationWithoutEqual(final int op) {
+    private static int getOperationWithoutEqual(final int op) {
         int token = -1;
         switch (op) {
             case LOGICAL_OR_EQUAL:

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/transform/trait/TraitReceiverTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/transform/trait/TraitReceiverTransformer.java b/src/main/org/codehaus/groovy/transform/trait/TraitReceiverTransformer.java
index b716b43..42729b0 100644
--- a/src/main/org/codehaus/groovy/transform/trait/TraitReceiverTransformer.java
+++ b/src/main/org/codehaus/groovy/transform/trait/TraitReceiverTransformer.java
@@ -276,7 +276,7 @@ class TraitReceiverTransformer extends ClassCodeExpressionTransformer {
         return ret;
     }
 
-    private void markDynamicCall(final MethodCallExpression mce, final FieldNode fn, final boolean isStatic) {
+    private static void markDynamicCall(final MethodCallExpression mce, final FieldNode fn, final boolean isStatic) {
         if (isStatic) {
             mce.putNodeMetaData(TraitASTTransformation.DO_DYNAMIC, fn.getOriginType());
         }
@@ -304,7 +304,7 @@ class TraitReceiverTransformer extends ClassCodeExpressionTransformer {
                 transform(rightExpression));
     }
 
-    private FieldNode tryGetFieldNode(final ClassNode weavedType, final String fieldName) {
+    private static FieldNode tryGetFieldNode(final ClassNode weavedType, final String fieldName) {
         FieldNode fn = weavedType.getDeclaredField(fieldName);
         if (fn == null && ClassHelper.CLASS_Type.equals(weavedType)) {
             GenericsType[] genericsTypes = weavedType.getGenericsTypes();

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/util/AbstractConcurrentMapBase.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/util/AbstractConcurrentMapBase.java b/src/main/org/codehaus/groovy/util/AbstractConcurrentMapBase.java
index 109a652..b21c0af 100644
--- a/src/main/org/codehaus/groovy/util/AbstractConcurrentMapBase.java
+++ b/src/main/org/codehaus/groovy/util/AbstractConcurrentMapBase.java
@@ -291,7 +291,7 @@ public abstract class AbstractConcurrentMapBase {
             count = newCount;
         }
 
-        private void put(Entry ee, int index, Object[] tab) {
+        private static void put(Entry ee, int index, Object[] tab) {
             Object o = tab[index];
             if (o != null) {
                 if (o instanceof Entry) {
@@ -313,7 +313,7 @@ public abstract class AbstractConcurrentMapBase {
             tab[index] = ee;
         }
 
-        private Object put(Entry ee, Object o) {
+        private static Object put(Entry ee, Object o) {
             if (o != null) {
                 if (o instanceof Entry) {
                     Object arr [] = new Object [2];

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/util/ComplexKeyHashMap.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/util/ComplexKeyHashMap.java b/src/main/org/codehaus/groovy/util/ComplexKeyHashMap.java
index 54d692d..cea2c8d 100644
--- a/src/main/org/codehaus/groovy/util/ComplexKeyHashMap.java
+++ b/src/main/org/codehaus/groovy/util/ComplexKeyHashMap.java
@@ -107,7 +107,7 @@ public class ComplexKeyHashMap
       threshold = (6 * newLength) / 8;
   }
 
-  private int capacity(int expectedMaxSize) {
+  private static int capacity(int expectedMaxSize) {
       // Compute min capacity for expectedMaxSize given a load factor of 3/4
       int minCapacity = (8 * expectedMaxSize)/6;
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/src/main/org/codehaus/groovy/vmplugin/v5/Java5.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/vmplugin/v5/Java5.java b/src/main/org/codehaus/groovy/vmplugin/v5/Java5.java
index 3f7446f..17d7794 100644
--- a/src/main/org/codehaus/groovy/vmplugin/v5/Java5.java
+++ b/src/main/org/codehaus/groovy/vmplugin/v5/Java5.java
@@ -129,7 +129,7 @@ public class Java5 implements VMPlugin {
         }
     }
 
-    private ClassNode configureClass(Class c) {
+    private static ClassNode configureClass(Class c) {
         if (c.isPrimitive()) {
             return ClassHelper.make(c);
         } else {
@@ -341,7 +341,7 @@ public class Java5 implements VMPlugin {
         }
     }
 
-    private void setMethodDefaultValue(MethodNode mn, Method m) {
+    private static void setMethodDefaultValue(MethodNode mn, Method m) {
         Object defaultValue = m.getDefaultValue();
         ConstantExpression cExp = ConstantExpression.NULL;
         if (defaultValue!=null) cExp = new ConstantExpression(defaultValue);

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-bsf/src/main/java/org/codehaus/groovy/bsf/GroovyEngine.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-bsf/src/main/java/org/codehaus/groovy/bsf/GroovyEngine.java b/subprojects/groovy-bsf/src/main/java/org/codehaus/groovy/bsf/GroovyEngine.java
index ae27024..1c524fe 100644
--- a/subprojects/groovy-bsf/src/main/java/org/codehaus/groovy/bsf/GroovyEngine.java
+++ b/subprojects/groovy-bsf/src/main/java/org/codehaus/groovy/bsf/GroovyEngine.java
@@ -48,7 +48,7 @@ public class GroovyEngine extends BSFEngineImpl {
      * The method simply replaces any invalid characters
      * with "_".
      */
-    private String convertToValidJavaClassname(String inName) {
+    private static String convertToValidJavaClassname(String inName) {
         if (inName == null) return "_";
         if (inName.startsWith("scriptdef_")) inName = inName.substring(10);
         if (inName.equals("")) return "_";

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocTool.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocTool.java b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocTool.java
index 9d0e34e..9566cea 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocTool.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocTool.java
@@ -102,7 +102,7 @@ public class GroovyDocTool {
         }
     }
 
-    String getPath(String filename) {
+    static String getPath(String filename) {
         String path = new File(filename).getParent();
         // path length of 1 indicates that probably is 'default package' i.e. "/"
         if (path == null || (path.length() == 1 && !Character.isJavaIdentifierStart(path.charAt(0)))) {
@@ -111,7 +111,7 @@ public class GroovyDocTool {
         return path;
     }
 
-    String getFile(String filename) {
+    static String getFile(String filename) {
         return new File(filename).getName();
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocWriter.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocWriter.java b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocWriter.java
index 2b8a7c2..212da99 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocWriter.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocWriter.java
@@ -108,7 +108,7 @@ public class GroovyDocWriter {
         }
     }
 
-    private boolean hasBinaryExtension(String template) {
+    private static boolean hasBinaryExtension(String template) {
         return template.endsWith(".gif") || template.endsWith(".ico");
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyRootDocBuilder.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyRootDocBuilder.java b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyRootDocBuilder.java
index 08f3868..9989368 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyRootDocBuilder.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyRootDocBuilder.java
@@ -134,7 +134,7 @@ public class GroovyRootDocBuilder {
         return ((SimpleGroovyClassDocAssembler) visitor).getGroovyClassDocs();
     }
 
-    private JavaRecognizer getJavaParser(String input, SourceBuffer sourceBuffer) {
+    private static JavaRecognizer getJavaParser(String input, SourceBuffer sourceBuffer) {
         UnicodeEscapingReader unicodeReader = new UnicodeEscapingReader(new StringReader(input), sourceBuffer);
         JavaLexer lexer = new JavaLexer(unicodeReader);
         unicodeReader.setLexer(lexer);
@@ -143,7 +143,7 @@ public class GroovyRootDocBuilder {
         return parser;
     }
 
-    private GroovyRecognizer getGroovyParser(String input, SourceBuffer sourceBuffer) {
+    private static GroovyRecognizer getGroovyParser(String input, SourceBuffer sourceBuffer) {
         UnicodeEscapingReader unicodeReader = new UnicodeEscapingReader(new StringReader(input), sourceBuffer);
         GroovyLexer lexer = new GroovyLexer(unicodeReader);
         unicodeReader.setLexer(lexer);
@@ -280,7 +280,7 @@ public class GroovyRootDocBuilder {
         return SimpleGroovyClassDoc.replaceAllTags(self, s1, s2, regex, links, relPath, rootDoc, null);
     }
 
-    private void calcThenSetSummary(String src, SimpleGroovyPackageDoc packageDoc) {
+    private static void calcThenSetSummary(String src, SimpleGroovyPackageDoc packageDoc) {
         packageDoc.setSummary(SimpleGroovyDoc.calculateFirstSentence(src));
     }
 
@@ -289,13 +289,13 @@ public class GroovyRootDocBuilder {
         rootDoc.setDescription(description);
     }
 
-    private String trimPackageAndComments(String src) {
+    private static String trimPackageAndComments(String src) {
         return src.replaceFirst("(?sm)^package.*", "")
                 .replaceFirst("(?sm)/.*\\*\\*(.*)\\*/", "$1")
                 .replaceAll("(?m)^\\s*\\*", "");
     }
 
-    private String scrubOffExcessiveTags(String src) {
+    private static String scrubOffExcessiveTags(String src) {
         String description = pruneTagFromFront(src, "html");
         description = pruneTagFromFront(description, "/head");
         description = pruneTagFromFront(description, "body");
@@ -303,20 +303,20 @@ public class GroovyRootDocBuilder {
         return pruneTagFromEnd(description, "/body");
     }
 
-    private String pruneTagFromFront(String description, String tag) {
+    private static String pruneTagFromFront(String description, String tag) {
         int index = Math.max(indexOfTag(description, tag.toLowerCase()), indexOfTag(description, tag.toUpperCase()));
         if (index < 0) return description;
         return description.substring(index);
     }
 
-    private String pruneTagFromEnd(String description, String tag) {
+    private static String pruneTagFromEnd(String description, String tag) {
         int index = Math.max(description.lastIndexOf("<" + tag.toLowerCase() + ">"),
                 description.lastIndexOf("<" + tag.toUpperCase() + ">"));
         if (index < 0) return description;
         return description.substring(0, index);
     }
 
-    private int indexOfTag(String text, String tag) {
+    private static int indexOfTag(String text, String tag) {
         int pos = text.indexOf("<" + tag + ">");
         if (pos > 0) pos += tag.length() + 2;
         return pos;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDocAssembler.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDocAssembler.java b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDocAssembler.java
index 48d3222..91cc56e 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDocAssembler.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDocAssembler.java
@@ -210,7 +210,7 @@ public class SimpleGroovyClassDocAssembler extends VisitorAdapter implements Gro
         }
     }
 
-    private List<GroovySourceAST> findTypeNames(GroovySourceAST t) {
+    private static List<GroovySourceAST> findTypeNames(GroovySourceAST t) {
         List<GroovySourceAST> types = new ArrayList<GroovySourceAST>();
         for (AST child = t.getFirstChild(); child != null; child = child.getNextSibling()) {
             GroovySourceAST groovySourceAST = (GroovySourceAST) child;
@@ -340,7 +340,7 @@ public class SimpleGroovyClassDocAssembler extends VisitorAdapter implements Gro
         return currentMethodDoc;
     }
 
-    private GroovyMethodDoc createMainMethod(SimpleGroovyClassDoc currentClassDoc) {
+    private static GroovyMethodDoc createMainMethod(SimpleGroovyClassDoc currentClassDoc) {
         SimpleGroovyMethodDoc mainMethod = new SimpleGroovyMethodDoc("main", currentClassDoc);
         mainMethod.setPublic(true);
         mainMethod.setStatic(true);
@@ -465,13 +465,13 @@ public class SimpleGroovyClassDocAssembler extends VisitorAdapter implements Gro
         return getCurrentClassDoc() != null;
     }
 
-    private boolean isTopLevelConstruct(GroovySourceAST node) {
+    private static boolean isTopLevelConstruct(GroovySourceAST node) {
         if (node == null) return false;
         int type = node.getType();
         return type == CLASS_DEF || type == INTERFACE_DEF || type == TRAIT_DEF || type == ANNOTATION_DEF || type == ENUM_DEF;
     }
 
-    private void adjustForAutomaticEnumMethods(SimpleGroovyClassDoc currentClassDoc) {
+    private static void adjustForAutomaticEnumMethods(SimpleGroovyClassDoc currentClassDoc) {
         SimpleGroovyMethodDoc valueOf = new SimpleGroovyMethodDoc("valueOf", currentClassDoc);
         valueOf.setRawCommentText("Returns the enum constant of this type with the specified name.");
         SimpleGroovyParameter parameter = new SimpleGroovyParameter("name");
@@ -490,7 +490,7 @@ public class SimpleGroovyClassDocAssembler extends VisitorAdapter implements Gro
         return recurseDownImportBranch(getImportPathDotType(t));
     }
 
-    private GroovySourceAST getImportPathDotType(GroovySourceAST t) {
+    private static GroovySourceAST getImportPathDotType(GroovySourceAST t) {
         GroovySourceAST child = t.childOfType(DOT);
         if (child == null) {
             child = t.childOfType(IDENT);
@@ -693,14 +693,14 @@ public class SimpleGroovyClassDocAssembler extends VisitorAdapter implements Gro
         return result;
     }
 
-    private boolean isMajorType(GroovySourceAST t) {
+    private static boolean isMajorType(GroovySourceAST t) {
         if (t == null) return false;
         int tt = t.getType();
         return tt == CLASS_DEF || tt == TRAIT_DEF || tt == INTERFACE_DEF || tt == METHOD_DEF || tt == ANNOTATION_DEF || tt == ENUM_DEF ||
                 tt == VARIABLE_DEF || tt == ANNOTATION_FIELD_DEF || tt == ENUM_CONSTANT_DEF || tt == CTOR_IDENT;
     }
 
-    private String getText(GroovySourceAST node) {
+    private static String getText(GroovySourceAST node) {
         String returnValue = null;
         if (node != null) {
             returnValue = node.getText();
@@ -950,7 +950,7 @@ public class SimpleGroovyClassDocAssembler extends VisitorAdapter implements Gro
         return result;
     }
 
-    private String getIdentFor(GroovySourceAST gpn) {
+    private static String getIdentFor(GroovySourceAST gpn) {
         return gpn.childOfType(IDENT).getText();
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java b/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java
index 6a7804f..5c5c4ac 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java
@@ -314,7 +314,7 @@ public class JsonBuilder extends GroovyObjectSupport implements Writable {
         }
     }
 
-    private List<Map<String, Object>> collectContentForEachEntry(Iterable coll, Closure closure) {
+    private static List<Map<String, Object>> collectContentForEachEntry(Iterable coll, Closure closure) {
         List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
         for (Object it : coll) {
             list.add(JsonDelegate.curryDelegateAndGetContent(closure, it));

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-json/src/main/java/groovy/json/JsonDelegate.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/JsonDelegate.java b/subprojects/groovy-json/src/main/java/groovy/json/JsonDelegate.java
index 76e297c..23969dc 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/JsonDelegate.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/JsonDelegate.java
@@ -65,7 +65,7 @@ public class JsonDelegate extends GroovyObjectSupport {
         return val;
     }
 
-    private boolean isIterableOrArrayAndClosure(Object[] args) {
+    private static boolean isIterableOrArrayAndClosure(Object[] args) {
         if (args.length != 2 || !(args[1] instanceof Closure)) {
             return false;
         }

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-json/src/main/java/groovy/json/internal/LazyValueMap.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/internal/LazyValueMap.java b/subprojects/groovy-json/src/main/java/groovy/json/internal/LazyValueMap.java
index 91dea6e..a860c96 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/internal/LazyValueMap.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/internal/LazyValueMap.java
@@ -171,7 +171,7 @@ public class LazyValueMap extends AbstractMap<String, Object> implements ValueMa
     }
 
     /* We need to chop up this child container. */
-    private void chopContainer(Value value) {
+    private static void chopContainer(Value value) {
         Object obj = value.toValue();
         if (obj instanceof LazyValueMap) {
             LazyValueMap map = (LazyValueMap) obj;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-json/src/main/java/groovy/json/internal/ReaderCharacterSource.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/internal/ReaderCharacterSource.java b/subprojects/groovy-json/src/main/java/groovy/json/internal/ReaderCharacterSource.java
index b2521c6..8d4896a 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/internal/ReaderCharacterSource.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/internal/ReaderCharacterSource.java
@@ -152,7 +152,7 @@ public class ReaderCharacterSource implements CharacterSource {
         }
     }
 
-    private final char[] EMPTY_CHARS = new char[0];
+    private static final char[] EMPTY_CHARS = new char[0];
 
     public char[] findNextChar(int match, int esc) {
         try {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-json/src/main/java/groovy/json/internal/ValueList.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/internal/ValueList.java b/subprojects/groovy-json/src/main/java/groovy/json/internal/ValueList.java
index fcb011d..0320791 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/internal/ValueList.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/internal/ValueList.java
@@ -49,7 +49,7 @@ public class ValueList extends AbstractList<Object> {
         return obj;
     }
 
-    private Object convert(Value value) {
+    private static Object convert(Value value) {
         return value.toValue();
     }
 
@@ -106,7 +106,7 @@ public class ValueList extends AbstractList<Object> {
         }
     }
 
-    void chopContainer(Value value) {
+    static void chopContainer(Value value) {
         Object obj = value.toValue();
         if (obj instanceof LazyValueMap) {
             LazyValueMap map = (LazyValueMap) obj;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.java b/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.java
index 3398160..32f33bd 100644
--- a/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.java
+++ b/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.java
@@ -416,7 +416,7 @@ public class GroovyScriptEngineImpl extends AbstractScriptEngine implements Comp
     }
 
     // generate a unique name for top-level Script classes
-    private synchronized String generateScriptName() {
+    private static synchronized String generateScriptName() {
         return "Script" + (++counter) + ".groovy";
     }
 
@@ -454,7 +454,7 @@ public class GroovyScriptEngineImpl extends AbstractScriptEngine implements Comp
         return Script.class.getClassLoader();
     }
 
-    private String readFully(Reader reader) throws ScriptException {
+    private static String readFully(Reader reader) throws ScriptException {
         char[] arr = new char[8 * 1024]; // 8K at a time
         StringBuilder buf = new StringBuilder();
         int numChars;

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/runtime/MacroBuilder.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/runtime/MacroBuilder.java b/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/runtime/MacroBuilder.java
index 2e78d28..ab4c4f3 100644
--- a/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/runtime/MacroBuilder.java
+++ b/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/runtime/MacroBuilder.java
@@ -89,7 +89,7 @@ public enum MacroBuilder {
         return null;
     }
 
-    private void performSubstitutions(final int linesOffset, final int columnsOffset, final Map<MacroSubstitutionKey, Closure<Expression>> context, final ASTNode astNode) {
+    private static void performSubstitutions(final int linesOffset, final int columnsOffset, final Map<MacroSubstitutionKey, Closure<Expression>> context, final ASTNode astNode) {
         ClassCodeExpressionTransformer trn = new ClassCodeExpressionTransformer() {
             public Expression transform(Expression expression) {
                 if (!(expression instanceof MethodCallExpression)) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-servlet/src/main/java/groovy/servlet/ServletBinding.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-servlet/src/main/java/groovy/servlet/ServletBinding.java b/subprojects/groovy-servlet/src/main/java/groovy/servlet/ServletBinding.java
index 3f273ac..ad58122 100644
--- a/subprojects/groovy-servlet/src/main/java/groovy/servlet/ServletBinding.java
+++ b/subprojects/groovy-servlet/src/main/java/groovy/servlet/ServletBinding.java
@@ -329,7 +329,7 @@ public class ServletBinding extends Binding {
         super.setVariable("redirect", c);
     }
 
-    private void validateArgs(String name, String message) {
+    private static void validateArgs(String name, String message) {
         if (name == null) {
             throw new IllegalArgumentException(message + " null key.");
         }
@@ -338,7 +338,7 @@ public class ServletBinding extends Binding {
         }
     }
 
-    private void excludeReservedName(String name, String reservedName) {
+    private static void excludeReservedName(String name, String reservedName) {
         if (reservedName.equals(name)) {
             throw new IllegalArgumentException("Can't bind variable to key named '" + name + "'.");
         }

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-sql/src/main/java/groovy/sql/DataSet.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-sql/src/main/java/groovy/sql/DataSet.java b/subprojects/groovy-sql/src/main/java/groovy/sql/DataSet.java
index e4fe883..0b4d08f 100644
--- a/subprojects/groovy-sql/src/main/java/groovy/sql/DataSet.java
+++ b/subprojects/groovy-sql/src/main/java/groovy/sql/DataSet.java
@@ -423,7 +423,7 @@ public class DataSet extends Sql {
         return sortVisitor;
     }
 
-    private void visit(Closure closure, CodeVisitorSupport visitor) {
+    private static void visit(Closure closure, CodeVisitorSupport visitor) {
         if (closure != null) {
             ClassNode classNode = closure.getMetaClass().getClassNode();
             if (classNode == null) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-sql/src/main/java/groovy/sql/ExtractIndexAndSql.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-sql/src/main/java/groovy/sql/ExtractIndexAndSql.java b/subprojects/groovy-sql/src/main/java/groovy/sql/ExtractIndexAndSql.java
index ac0e3a6..59d9c7d 100644
--- a/subprojects/groovy-sql/src/main/java/groovy/sql/ExtractIndexAndSql.java
+++ b/subprojects/groovy-sql/src/main/java/groovy/sql/ExtractIndexAndSql.java
@@ -185,7 +185,7 @@ class ExtractIndexAndSql {
         return ((index + 1) < sql.length()) ? sql.charAt(index + 1) : '\0';
     }
 
-    private String adaptForNamedParams(String sql, List<Tuple> indexPropList) {
+    private static String adaptForNamedParams(String sql, List<Tuple> indexPropList) {
         StringBuilder newSql = new StringBuilder();
         int txtIndex = 0;
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java b/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
index 1e064d5..7816dec 100644
--- a/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
+++ b/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
@@ -1033,7 +1033,7 @@ public class Sql {
         query(sql, singletonList(map), closure);
     }
 
-    private ArrayList<Object> singletonList(Object item) {
+    private static ArrayList<Object> singletonList(Object item) {
         ArrayList<Object> params = new ArrayList<Object>();
         params.add(item);
         return params;
@@ -1205,7 +1205,7 @@ public class Sql {
         }
     }
 
-    private boolean moveCursor(ResultSet results, int offset) throws SQLException {
+    private static boolean moveCursor(ResultSet results, int offset) throws SQLException {
         boolean cursorAtRow = true;
         if (results.getType() == ResultSet.TYPE_FORWARD_ONLY) {
             int i = 1;
@@ -4228,7 +4228,7 @@ public class Sql {
         closeResources((BatchingStatementWrapper) statement);
     }
 
-    private void closeResources(BatchingStatementWrapper statement) {
+    private static void closeResources(BatchingStatementWrapper statement) {
         if (statement != null) {
             try {
                 statement.close();
@@ -4273,7 +4273,7 @@ public class Sql {
     // private implementation methods
     //-------------------------------------------------------------------------
 
-    private List<List<Object>> calculateKeys(ResultSet keys) throws SQLException {
+    private static List<List<Object>> calculateKeys(ResultSet keys) throws SQLException {
         // Prepare a list to contain the auto-generated column
         // values, and then fetch them from the statement.
         List<List<Object>> autoKeys = new ArrayList<List<Object>>();
@@ -4298,14 +4298,14 @@ public class Sql {
         return connection.createStatement(resultSetType, resultSetConcurrency, resultSetHoldability);
     }
 
-    private void handleError(Connection connection, Throwable t) throws SQLException {
+    private static void handleError(Connection connection, Throwable t) throws SQLException {
         if (connection != null) {
             LOG.warning("Rolling back due to: " + t.getMessage());
             connection.rollback();
         }
     }
 
-    private void callClosurePossiblyWithConnection(Closure closure, Connection connection) {
+    private static void callClosurePossiblyWithConnection(Closure closure, Connection connection) {
         if (closure.getMaximumNumberOfParameters() == 1) {
             closure.call(connection);
         } else {

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5d56e8d/subprojects/groovy-swing/src/main/java/groovy/inspect/swingui/TableSorter.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-swing/src/main/java/groovy/inspect/swingui/TableSorter.java b/subprojects/groovy-swing/src/main/java/groovy/inspect/swingui/TableSorter.java
index 5b5b52c..7425acc 100644
--- a/subprojects/groovy-swing/src/main/java/groovy/inspect/swingui/TableSorter.java
+++ b/subprojects/groovy-swing/src/main/java/groovy/inspect/swingui/TableSorter.java
@@ -107,7 +107,7 @@ space and avoid unnecessary heap allocation.
         return compareObjects(data, row1, column, row2);
     }
 
-    private int compareObjects(TableModel data, int row1, int column, int row2) {
+    private static int compareObjects(TableModel data, int row1, int column, int row2) {
         Object v1 = data.getValueAt(row1, column);
         String s1 = v1.toString();
         Object v2 = data.getValueAt(row2, column);
@@ -121,7 +121,7 @@ space and avoid unnecessary heap allocation.
         return 0;
     }
 
-    private int compareBooleans(TableModel data, int row1, int column, int row2) {
+    private static int compareBooleans(TableModel data, int row1, int column, int row2) {
         Boolean bool1 = (Boolean) data.getValueAt(row1, column);
         boolean b1 = bool1.booleanValue();
         Boolean bool2 = (Boolean) data.getValueAt(row2, column);
@@ -134,7 +134,7 @@ space and avoid unnecessary heap allocation.
         return -1;
     }
 
-    private int compareStrings(TableModel data, int row1, int column, int row2) {
+    private static int compareStrings(TableModel data, int row1, int column, int row2) {
         String s1 = (String) data.getValueAt(row1, column);
         String s2 = (String) data.getValueAt(row2, column);
         int result = s1.compareTo(s2);
@@ -146,7 +146,7 @@ space and avoid unnecessary heap allocation.
         return 0;
     }
 
-    private int compareDates(TableModel data, int row1, int column, int row2) {
+    private static int compareDates(TableModel data, int row1, int column, int row2) {
         Date d1 = (Date) data.getValueAt(row1, column);
         long n1 = d1.getTime();
         Date d2 = (Date) data.getValueAt(row2, column);
@@ -159,7 +159,7 @@ space and avoid unnecessary heap allocation.
         return 0;
     }
 
-    private int compareNumbers(TableModel data, int row1, int column, int row2) {
+    private static int compareNumbers(TableModel data, int row1, int column, int row2) {
         Number n1 = (Number) data.getValueAt(row1, column);
         double d1 = n1.doubleValue();
         Number n2 = (Number) data.getValueAt(row2, column);


Mime
View raw message