groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject groovy git commit: formatting only
Date Thu, 21 Apr 2016 04:49:41 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X 0a8655263 -> 043999e09


formatting only


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

Branch: refs/heads/GROOVY_2_4_X
Commit: 043999e098d1e58e2f40d7749e064578c7765cfd
Parents: 0a86552
Author: paulk <paulk@asert.com.au>
Authored: Thu Apr 21 14:46:57 2016 +1000
Committer: paulk <paulk@asert.com.au>
Committed: Thu Apr 21 14:48:35 2016 +1000

----------------------------------------------------------------------
 .../groovy/reflection/CachedMethod.java         | 62 ++++++++++----------
 1 file changed, 30 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/043999e0/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 3ef4744..cff72f2 100644
--- a/src/main/org/codehaus/groovy/reflection/CachedMethod.java
+++ b/src/main/org/codehaus/groovy/reflection/CachedMethod.java
@@ -142,59 +142,57 @@ public class CachedMethod extends MetaMethod implements Comparable {
         return compareToMethod((Method)o);
     }
 
-    private int compareToCachedMethod(CachedMethod m) {
-        if (m == null)
-         return -1;
+    private int compareToCachedMethod(CachedMethod other) {
+        if (other == null)
+            return -1;
 
-        final int strComp = getName().compareTo(m.getName());
+        final int strComp = getName().compareTo(other.getName());
         if (strComp != 0)
-          return strComp;
+            return strComp;
 
-        final int retComp = getReturnType().getName().compareTo(m.getReturnType().getName());
+        final int retComp = getReturnType().getName().compareTo(other.getReturnType().getName());
         if (retComp != 0)
-          return retComp;
+            return retComp;
 
-        CachedClass[]  params =   getParameterTypes();
-        CachedClass [] mparams = m.getParameterTypes();
+        CachedClass[] params = getParameterTypes();
+        CachedClass[] otherParams = other.getParameterTypes();
 
-        final int pd = params.length - mparams.length;
+        final int pd = params.length - otherParams.length;
         if (pd != 0)
-          return pd;
+            return pd;
 
-        for (int i = 0; i != params.length; ++i)
-        {
-            final int nameComp = params[i].getName().compareTo(mparams[i].getName());
+        for (int i = 0; i != params.length; ++i) {
+            final int nameComp = params[i].getName().compareTo(otherParams[i].getName());
             if (nameComp != 0)
-              return nameComp;
+                return nameComp;
         }
 
         throw new RuntimeException("Should never happen");
     }
 
-    private int compareToMethod(Method m) {
-        if (m == null)
-         return -1;
+    private int compareToMethod(Method other) {
+        if (other == null)
+            return -1;
 
-        final int strComp = getName().compareTo(m.getName());
+        final int strComp = getName().compareTo(other.getName());
         if (strComp != 0)
-          return strComp;
+            return strComp;
 
-        final int retComp = getReturnType().getName().compareTo(m.getReturnType().getName());
+        final int retComp = getReturnType().getName().compareTo(other.getReturnType().getName());
         if (retComp != 0)
-          return retComp;
+            return retComp;
 
-        CachedClass[]  params =   getParameterTypes();
-        Class [] mparams = m.getParameterTypes();
+        CachedClass[] params = getParameterTypes();
+        Class[] mparams = other.getParameterTypes();
 
         final int pd = params.length - mparams.length;
         if (pd != 0)
-          return pd;
+            return pd;
 
-        for (int i = 0; i != params.length; ++i)
-        {
+        for (int i = 0; i != params.length; ++i) {
             final int nameComp = params[i].getName().compareTo(mparams[i].getName());
             if (nameComp != 0)
-              return nameComp;
+                return nameComp;
         }
 
         return 0;
@@ -218,14 +216,14 @@ public class CachedMethod extends MetaMethod implements Comparable {
         return cachedMethod.toString();
     }
     
-    private Constructor getConstrcutor(SoftReference<Constructor> ref) {
+    private Constructor getConstructor(SoftReference<Constructor> ref) {
         if (ref==null) return null;
         return ref.get();
     }
 
     public CallSite createPogoMetaMethodSite(CallSite site, MetaClassImpl metaClass, Class[]
params) {
         if (!skipCompiled) {
-            Constructor constr = getConstrcutor(pogoCallSiteConstructor);
+            Constructor constr = getConstructor(pogoCallSiteConstructor);
             if (constr==null) {
                 if (CallSiteGenerator.isCompilable(this)) {
                   constr = CallSiteGenerator.compilePogoMethod(this);
@@ -254,7 +252,7 @@ public class CachedMethod extends MetaMethod implements Comparable {
 
     public CallSite createPojoMetaMethodSite(CallSite site, MetaClassImpl metaClass, Class[]
params) {
         if (!skipCompiled) {
-            Constructor constr = getConstrcutor(pojoCallSiteConstructor);
+            Constructor constr = getConstructor(pojoCallSiteConstructor);
             if (constr==null) {
                 if (CallSiteGenerator.isCompilable(this)) {
                   constr = CallSiteGenerator.compilePojoMethod(this);
@@ -282,7 +280,7 @@ public class CachedMethod extends MetaMethod implements Comparable {
 
     public CallSite createStaticMetaMethodSite(CallSite site, MetaClassImpl metaClass, Class[]
params) {
         if (!skipCompiled) {
-            Constructor constr = getConstrcutor(staticCallSiteConstructor);
+            Constructor constr = getConstructor(staticCallSiteConstructor);
             if (constr==null) {
                 if (CallSiteGenerator.isCompilable(this)) {
                   constr = CallSiteGenerator.compileStaticMethod(this);


Mime
View raw message