commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject [2/2] [lang] Checkstyle: Convert tabs to spaces
Date Mon, 19 Sep 2016 11:40:58 GMT
Checkstyle: Convert tabs to spaces


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

Branch: refs/heads/master
Commit: d962a2b31c9a7216c2df557eaed3e475b13939f1
Parents: d58d64d
Author: Benedikt Ritter <britter@apache.org>
Authored: Mon Sep 19 13:40:46 2016 +0200
Committer: Benedikt Ritter <britter@apache.org>
Committed: Mon Sep 19 13:40:46 2016 +0200

----------------------------------------------------------------------
 .../commons/lang3/reflect/MethodUtils.java      | 36 ++++++++++----------
 1 file changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/d962a2b3/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java b/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
index 3acbd73..388eba7 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
@@ -764,24 +764,24 @@ public class MethodUtils {
      * @return the aggregate number of inheritance hops between assignable argument class
types.
      */
     private static int distance(Class<?>[] classArray, Class<?>[] toClassArray)
{
-    	int answer=0;
-    	
-    	if (!ClassUtils.isAssignable(classArray, toClassArray, true)) {
-    		return -1;
-    	}
-    	for (int offset = 0; offset < classArray.length; offset++) {
-    		// Note InheritanceUtils.distance() uses different scoring system.
-    		if (classArray[offset].equals(toClassArray[offset])) {
-    			continue;
-    		} else if (ClassUtils.isAssignable(classArray[offset], toClassArray[offset], true)

-    				&& !ClassUtils.isAssignable(classArray[offset], toClassArray[offset], false))
{
-    			answer++;
-    		} else {
-    			answer = answer+2;
-    		}
-    	}
-    	
-    	return answer;
+        int answer = 0;
+
+        if (!ClassUtils.isAssignable(classArray, toClassArray, true)) {
+            return -1;
+        }
+        for (int offset = 0; offset < classArray.length; offset++) {
+            // Note InheritanceUtils.distance() uses different scoring system.
+            if (classArray[offset].equals(toClassArray[offset])) {
+                continue;
+            } else if (ClassUtils.isAssignable(classArray[offset], toClassArray[offset],
true)
+                    && !ClassUtils.isAssignable(classArray[offset], toClassArray[offset],
false)) {
+                answer++;
+            } else {
+                answer = answer + 2;
+            }
+        }
+
+        return answer;
     }
 
     /**


Mime
View raw message