From bf2d0bf02baa3f71a0b0fd3aed74934cdf143a6b Mon Sep 17 00:00:00 2001 From: "shalk(xiao kun)" Date: Tue, 14 Jun 2022 06:14:37 +0800 Subject: [PATCH 1/2] update ClassUtils javadoc with throw npe (#912) --- src/main/java/org/apache/commons/lang3/ClassUtils.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/apache/commons/lang3/ClassUtils.java b/src/main/java/org/apache/commons/lang3/ClassUtils.java index bdd6e9ef1..6dd8e2600 100644 --- a/src/main/java/org/apache/commons/lang3/ClassUtils.java +++ b/src/main/java/org/apache/commons/lang3/ClassUtils.java @@ -533,6 +533,7 @@ public class ClassUtils { * @param classLoader the class loader to use to load the class * @param className the class name * @return the class represented by {@code className} using the {@code classLoader} + * @throws NullPointerException if the className is null * @throws ClassNotFoundException if the class is not found */ public static Class getClass(final ClassLoader classLoader, final String className) throws ClassNotFoundException { @@ -548,6 +549,7 @@ public class ClassUtils { * @param className the class name * @param initialize whether the class must be initialized * @return the class represented by {@code className} using the {@code classLoader} + * @throws NullPointerException if the className is null * @throws ClassNotFoundException if the class is not found */ public static Class getClass(final ClassLoader classLoader, final String className, final boolean initialize) throws ClassNotFoundException { @@ -583,6 +585,7 @@ public class ClassUtils { * * @param className the class name * @return the class represented by {@code className} using the current thread's context class loader + * @throws NullPointerException if the className is null * @throws ClassNotFoundException if the class is not found */ public static Class getClass(final String className) throws ClassNotFoundException { @@ -597,6 +600,7 @@ public class ClassUtils { * @param className the class name * @param initialize whether the class must be initialized * @return the class represented by {@code className} using the current thread's context class loader + * @throws NullPointerException if the className is null * @throws ClassNotFoundException if the class is not found */ public static Class getClass(final String className, final boolean initialize) throws ClassNotFoundException { @@ -1582,6 +1586,7 @@ public class ClassUtils { * * @param className the class name * @return the converted name + * @throws NullPointerException if the className is null */ private static String toCanonicalName(String className) { className = StringUtils.deleteWhitespace(className); From 07403c9a943d8c4988c85bf6cccfa5926e4dffe1 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Mon, 13 Jun 2022 18:16:08 -0400 Subject: [PATCH 2/2] Update ClassUtils Javadoc with some missing throws NPE #912 --- src/changes/changes.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 1254580b7..33d7b7234 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -86,6 +86,7 @@ The type attribute can be add,update,fix,remove. Fix unstable coverage of CharSequenceUtils tests noticed during merge of PRs 898 and 899 #901. Rewrite Conversion.binaryBeMsb0ToHexDigit to invert logic of binaryToHexDigit. Allow extension of previously final classes ImmutablePair and ImmutableTriple. + Update ClassUtils Javadoc with some missing throws NPE #912. Add GitHub coverage.yml. Add EnumUtils.getEnumSystemProperty(...).