[java-opensaml] 02/04: OSJ-242: XMLConfigurator.createClassInstance() should catch Throwable

Brent Putman putmanb at georgetown.edu
Tue Sep 11 21:38:39 EDT 2018


This is an automated email from the git hooks/post-receive script.

putmanb pushed a commit to branch master
in repository java-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=9f8930c595c0f5f56f0038c7712606ef6afd1e5f

commit 9f8930c595c0f5f56f0038c7712606ef6afd1e5f
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Tue Sep 11 18:48:52 2018 -0400

    OSJ-242: XMLConfigurator.createClassInstance() should catch Throwable
---
 .../org/opensaml/core/xml/config/XMLConfigurationException.java     | 4 ++--
 .../src/main/java/org/opensaml/core/xml/config/XMLConfigurator.java | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/opensaml-core/src/main/java/org/opensaml/core/xml/config/XMLConfigurationException.java b/opensaml-core/src/main/java/org/opensaml/core/xml/config/XMLConfigurationException.java
index e6ceaf1..6909b73 100644
--- a/opensaml-core/src/main/java/org/opensaml/core/xml/config/XMLConfigurationException.java
+++ b/opensaml-core/src/main/java/org/opensaml/core/xml/config/XMLConfigurationException.java
@@ -49,7 +49,7 @@ public class XMLConfigurationException extends Exception {
      * 
      * @param wrappedException exception to be wrapped by this one
      */
-    public XMLConfigurationException(@Nullable final Exception wrappedException) {
+    public XMLConfigurationException(@Nullable final Throwable wrappedException) {
         super(wrappedException);
     }
 
@@ -59,7 +59,7 @@ public class XMLConfigurationException extends Exception {
      * @param message exception message
      * @param wrappedException exception to be wrapped by this one
      */
-    public XMLConfigurationException(@Nullable final String message, @Nullable final Exception wrappedException) {
+    public XMLConfigurationException(@Nullable final String message, @Nullable final Throwable wrappedException) {
         super(message, wrappedException);
     }
 }
\ No newline at end of file
diff --git a/opensaml-core/src/main/java/org/opensaml/core/xml/config/XMLConfigurator.java b/opensaml-core/src/main/java/org/opensaml/core/xml/config/XMLConfigurator.java
index 2de87f4..f9c6f2b 100644
--- a/opensaml-core/src/main/java/org/opensaml/core/xml/config/XMLConfigurator.java
+++ b/opensaml-core/src/main/java/org/opensaml/core/xml/config/XMLConfigurator.java
@@ -312,10 +312,10 @@ public class XMLConfigurator {
             final Class<?> clazz = classLoader.loadClass(className);
             final Constructor<?> constructor = clazz.getConstructor();
             return constructor.newInstance();
-        } catch (final Exception e) {
+        } catch (final Throwable t) {
             final String errorMsg = "Cannot create instance of " + className;
-            log.error(errorMsg, e);
-            throw new XMLConfigurationException(errorMsg, e);
+            log.error(errorMsg, t);
+            throw new XMLConfigurationException(errorMsg, t);
         }
     }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list