Skip to content

Commit 1a79f46

Browse files
committed
Remove unused
org.apache.commons.beanutils2.MethodUtils.toNonPrimitiveClass(Class) in favor of org.apache.commons.lang3.ClassUtils.primitiveToWrapper(Class)
1 parent e939065 commit 1a79f46

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
<action dev="ggregory" type="remove" due-to="Gary Gregory">Remove unused org.apache.commons.beanutils2.MethodUtils.invokeMethod(Object, String, Object[]) in favor of Apache Commons Lang's org.apache.commons.lang3.reflect.MethodUtils.</action>
4848
<action dev="ggregory" type="remove" due-to="Gary Gregory">Remove unused org.apache.commons.beanutils2.MethodUtils.invokeStaticMethod(Class, String, Object[]) in favor of Apache Commons Lang's org.apache.commons.lang3.reflect.MethodUtils.</action>
4949
<action dev="ggregory" type="remove" due-to="Gary Gregory">Remove unused org.apache.commons.beanutils2.MethodUtils.invokeStaticMethod(Class, String, Object[], Class[]) in favor of Apache Commons Lang's org.apache.commons.lang3.reflect.MethodUtils.</action>
50+
<action dev="ggregory" type="remove" due-to="Gary Gregory">Remove unused org.apache.commons.beanutils2.MethodUtils.toNonPrimitiveClass(Class) in favor of org.apache.commons.lang3.ClassUtils.primitiveToWrapper(Class).</action>
5051
</release>
5152
<release version="2.0.0-M2" date="2025-05-25" description="This is a major release and requires Java 8.">
5253
<!-- FIX -->

src/main/java/org/apache/commons/beanutils2/MethodUtils.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -850,23 +850,6 @@ private static Object[] toArray(final Object arg) {
850850
return args;
851851
}
852852

853-
/**
854-
* Find a non primitive representation for given primitive class.
855-
*
856-
* @param clazz the class to find a representation for, not null
857-
* @return the original class if it not a primitive. Otherwise the wrapper class. Not null
858-
*/
859-
public static Class<?> toNonPrimitiveClass(final Class<?> clazz) {
860-
if (clazz.isPrimitive()) {
861-
final Class<?> primitiveClazz = MethodUtils.getPrimitiveWrapper(clazz);
862-
// the above method returns
863-
if (primitiveClazz != null) {
864-
return primitiveClazz;
865-
}
866-
}
867-
return clazz;
868-
}
869-
870853
private MethodUtils() {
871854
// empty
872855
}

0 commit comments

Comments
 (0)