You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2022/01/13 15:04:17 UTC

[logging-log4j2] 01/03: Remove unused exception.

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/logging-log4j2.git

commit ef3112c50e59d1c60491080df90b50b3d9e1ad13
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jan 13 09:39:06 2022 -0500

    Remove unused exception.
---
 .../src/main/java/org/apache/logging/log4j/util/LoaderUtil.java  | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/LoaderUtil.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/LoaderUtil.java
index 6794430..b329121 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/LoaderUtil.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/LoaderUtil.java
@@ -267,13 +267,12 @@ public final class LoaderUtil {
      * @throws ClassNotFoundException if the class isn't available to the usual ClassLoaders
      * @throws IllegalAccessException if the class can't be instantiated through a public constructor
      * @throws InstantiationException if there was an exception whilst instantiating the class
-     * @throws NoSuchMethodException if there isn't a no-args constructor on the class
      * @throws InvocationTargetException if there was an exception whilst constructing the class
      * @since 2.1
      */
     @SuppressWarnings("unchecked")
     public static <T> T newInstanceOf(final String className) throws ClassNotFoundException, IllegalAccessException,
-            InstantiationException, NoSuchMethodException, InvocationTargetException {
+            InstantiationException, InvocationTargetException {
         return newInstanceOf((Class<T>) loadClass(className));
     }
 
@@ -287,13 +286,12 @@ public final class LoaderUtil {
      * @throws ClassNotFoundException if the class isn't available to the usual ClassLoaders
      * @throws IllegalAccessException if the class can't be instantiated through a public constructor
      * @throws InstantiationException if there was an exception whilst instantiating the class
-     * @throws NoSuchMethodException if there isn't a no-args constructor on the class
      * @throws InvocationTargetException if there was an exception whilst constructing the class
      * @throws ClassCastException if the constructed object isn't type compatible with {@code T}
      * @since 2.1
      */
     public static <T> T newCheckedInstanceOf(final String className, final Class<T> clazz)
-            throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException,
+            throws ClassNotFoundException, InvocationTargetException, InstantiationException,
             IllegalAccessException {
         return newInstanceOf(loadClass(className).asSubclass(clazz));
     }
@@ -308,13 +306,12 @@ public final class LoaderUtil {
      * @throws ClassNotFoundException    if the class isn't available to the usual ClassLoaders
      * @throws IllegalAccessException    if the class can't be instantiated through a public constructor
      * @throws InstantiationException    if there was an exception whilst instantiating the class
-     * @throws NoSuchMethodException     if there isn't a no-args constructor on the class
      * @throws InvocationTargetException if there was an exception whilst constructing the class
      * @throws ClassCastException        if the constructed object isn't type compatible with {@code T}
      * @since 2.5
      */
     public static <T> T newCheckedInstanceOfProperty(final String propertyName, final Class<T> clazz)
-        throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException,
+        throws ClassNotFoundException, InvocationTargetException, InstantiationException,
         IllegalAccessException {
         final String className = PropertiesUtil.getProperties().getStringProperty(propertyName);
         if (className == null) {