Skip to content

Commit c428164

Browse files
committed
Fix indentation
Reduce vertical whitespace
1 parent 20d8d42 commit c428164

File tree

2 files changed

+24
-27
lines changed

2 files changed

+24
-27
lines changed

src/main/java/org/apache/commons/lang3/reflect/InheritanceUtils.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,11 @@ public static int distance(final Class<?> child, final Class<?> parent) {
3838
if (child == null || parent == null) {
3939
return -1;
4040
}
41-
4241
if (child.equals(parent)) {
4342
return 0;
4443
}
45-
4644
final Class<?> cParent = child.getSuperclass();
4745
int d = BooleanUtils.toInteger(parent.equals(cParent));
48-
4946
if (d == 1) {
5047
return d;
5148
}

src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,34 +38,35 @@ final class MemberUtils {
3838
* providing a common representation for function signatures for Constructors and Methods.
3939
*/
4040
private static final class Executable {
41-
private static Executable of(final Constructor<?> constructor) {
42-
return new Executable(constructor);
43-
}
44-
private static Executable of(final Method method) {
45-
return new Executable(method);
46-
}
4741

48-
private final Class<?>[] parameterTypes;
42+
private static Executable of(final Constructor<?> constructor) {
43+
return new Executable(constructor);
44+
}
4945

50-
private final boolean isVarArgs;
46+
private static Executable of(final Method method) {
47+
return new Executable(method);
48+
}
5149

52-
private Executable(final Constructor<?> constructor) {
53-
parameterTypes = constructor.getParameterTypes();
54-
isVarArgs = constructor.isVarArgs();
55-
}
50+
private final Class<?>[] parameterTypes;
51+
private final boolean isVarArgs;
5652

57-
private Executable(final Method method) {
58-
parameterTypes = method.getParameterTypes();
59-
isVarArgs = method.isVarArgs();
60-
}
53+
private Executable(final Constructor<?> constructor) {
54+
parameterTypes = constructor.getParameterTypes();
55+
isVarArgs = constructor.isVarArgs();
56+
}
6157

62-
public Class<?>[] getParameterTypes() {
63-
return parameterTypes;
64-
}
58+
private Executable(final Method method) {
59+
parameterTypes = method.getParameterTypes();
60+
isVarArgs = method.isVarArgs();
61+
}
6562

66-
public boolean isVarArgs() {
67-
return isVarArgs;
68-
}
63+
public Class<?>[] getParameterTypes() {
64+
return parameterTypes;
65+
}
66+
67+
public boolean isVarArgs() {
68+
return isVarArgs;
69+
}
6970
}
7071

7172
private static final int ACCESS_TEST = Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE;
@@ -153,8 +154,7 @@ private static float getObjectTransformationCost(Class<?> srcClass, final Class<
153154
srcClass = srcClass.getSuperclass();
154155
}
155156
/*
156-
* If the destination class is null, we've traveled all the way up to
157-
* an Object match. We'll penalize this by adding 1.5 to the cost.
157+
* If the destination class is null, we've traveled all the way up to an Object match. We'll penalize this by adding 1.5 to the cost.
158158
*/
159159
if (srcClass == null) {
160160
cost += 1.5f;

0 commit comments

Comments
 (0)