This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push:
new c42816470 Fix indentation
c42816470 is described below
commit c42816470d13af7d3a76e8deb37c5b576da7fc5b
Author: Gary D. Gregory <[email protected]>
AuthorDate: Mon Aug 25 07:28:49 2025 -0400
Fix indentation
Reduce vertical whitespace
---
.../commons/lang3/reflect/InheritanceUtils.java | 3 --
.../apache/commons/lang3/reflect/MemberUtils.java | 48 +++++++++++-----------
2 files changed, 24 insertions(+), 27 deletions(-)
diff --git
a/src/main/java/org/apache/commons/lang3/reflect/InheritanceUtils.java
b/src/main/java/org/apache/commons/lang3/reflect/InheritanceUtils.java
index 4aa1ba9d8..01b7881c6 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/InheritanceUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/InheritanceUtils.java
@@ -38,14 +38,11 @@ public static int distance(final Class<?> child, final
Class<?> parent) {
if (child == null || parent == null) {
return -1;
}
-
if (child.equals(parent)) {
return 0;
}
-
final Class<?> cParent = child.getSuperclass();
int d = BooleanUtils.toInteger(parent.equals(cParent));
-
if (d == 1) {
return d;
}
diff --git a/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
b/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
index a244c5eb2..8982ac6bd 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
@@ -38,34 +38,35 @@ final class MemberUtils {
* providing a common representation for function signatures for
Constructors and Methods.
*/
private static final class Executable {
- private static Executable of(final Constructor<?> constructor) {
- return new Executable(constructor);
- }
- private static Executable of(final Method method) {
- return new Executable(method);
- }
- private final Class<?>[] parameterTypes;
+ private static Executable of(final Constructor<?> constructor) {
+ return new Executable(constructor);
+ }
- private final boolean isVarArgs;
+ private static Executable of(final Method method) {
+ return new Executable(method);
+ }
- private Executable(final Constructor<?> constructor) {
- parameterTypes = constructor.getParameterTypes();
- isVarArgs = constructor.isVarArgs();
- }
+ private final Class<?>[] parameterTypes;
+ private final boolean isVarArgs;
- private Executable(final Method method) {
- parameterTypes = method.getParameterTypes();
- isVarArgs = method.isVarArgs();
- }
+ private Executable(final Constructor<?> constructor) {
+ parameterTypes = constructor.getParameterTypes();
+ isVarArgs = constructor.isVarArgs();
+ }
- public Class<?>[] getParameterTypes() {
- return parameterTypes;
- }
+ private Executable(final Method method) {
+ parameterTypes = method.getParameterTypes();
+ isVarArgs = method.isVarArgs();
+ }
- public boolean isVarArgs() {
- return isVarArgs;
- }
+ public Class<?>[] getParameterTypes() {
+ return parameterTypes;
+ }
+
+ public boolean isVarArgs() {
+ return isVarArgs;
+ }
}
private static final int ACCESS_TEST = Modifier.PUBLIC |
Modifier.PROTECTED | Modifier.PRIVATE;
@@ -153,8 +154,7 @@ private static float getObjectTransformationCost(Class<?>
srcClass, final Class<
srcClass = srcClass.getSuperclass();
}
/*
- * 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.
+ * 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.
*/
if (srcClass == null) {
cost += 1.5f;