logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1516457 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java
Date Thu, 22 Aug 2013 14:15:40 GMT
Author: ggregory
Date: Thu Aug 22 14:15:39 2013
New Revision: 1516457

URL: http://svn.apache.org/r1516457
Log:
The declared exceptions IllegalAccessException and InvocationTargetException are not actually
thrown by the method getTCL() from the class Loader.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java?rev=1516457&r1=1516456&r2=1516457&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java
Thu Aug 22 14:15:39 2013
@@ -17,8 +17,6 @@
 package org.apache.logging.log4j.core.helpers;
 
 import java.io.InputStream;
-import java.io.InterruptedIOException;
-import java.lang.reflect.InvocationTargetException;
 import java.net.URL;
 
 import org.apache.logging.log4j.Logger;
@@ -97,14 +95,6 @@ public final class Loader {
                     return url;
                 }
             }
-        } catch (final IllegalAccessException t) {
-            LOGGER.warn(TSTR, t);
-        } catch (final InvocationTargetException t) {
-            if (t.getTargetException() instanceof InterruptedException
-                || t.getTargetException() instanceof InterruptedIOException) {
-                Thread.currentThread().interrupt();
-            }
-            LOGGER.warn(TSTR, t);
         } catch (final Throwable t) {
             //
             //  can't be InterruptedException or InterruptedIOException
@@ -174,14 +164,6 @@ public final class Loader {
                     return is;
                 }
             }
-        } catch (final IllegalAccessException t) {
-            LOGGER.warn(TSTR, t);
-        } catch (final InvocationTargetException t) {
-            if (t.getTargetException() instanceof InterruptedException
-                || t.getTargetException() instanceof InterruptedIOException) {
-                Thread.currentThread().interrupt();
-            }
-            LOGGER.warn(TSTR, t);
         } catch (final Throwable t) {
             //
             //  can't be InterruptedException or InterruptedIOException
@@ -254,7 +236,7 @@ public final class Loader {
         return getClassLoader(Loader.class, null);
     }
 
-    private static ClassLoader getTCL() throws IllegalAccessException, InvocationTargetException
{
+    private static ClassLoader getTCL() {
         ClassLoader cl;
         if (System.getSecurityManager() == null) {
             cl = Thread.currentThread().getContextClassLoader();



Mime
View raw message