[java-opensaml] branch master updated: Replace use of deprecated method.

Scott Cantor cantor.2 at osu.edu
Tue Jun 25 15:53:11 EDT 2019


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

scantor 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=232d58066ad02de266890975701d60a55989d069

The following commit(s) were added to refs/heads/master by this push:
       new  232d580   Replace use of deprecated method.
232d580 is described below

commit 232d58066ad02de266890975701d60a55989d069
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jun 25 15:53:02 2019 -0400

    Replace use of deprecated method.
---
 .../profile/action/AbstractHandlerDelegatingProfileAction.java      | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractHandlerDelegatingProfileAction.java b/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractHandlerDelegatingProfileAction.java
index 532ff47..d78094d 100644
--- a/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractHandlerDelegatingProfileAction.java
+++ b/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractHandlerDelegatingProfileAction.java
@@ -17,6 +17,7 @@
 
 package org.opensaml.profile.action;
 
+import java.lang.reflect.InvocationTargetException;
 import java.util.function.Function;
 import java.util.function.Predicate;
 
@@ -70,8 +71,9 @@ public abstract class AbstractHandlerDelegatingProfileAction<DelegateType extend
             @Nonnull final ContextDataLookupFunction<ProfileRequestContext, MessageContext> lookup) {
         Constraint.isNotNull(delegateClass, "Delegate class may not be null");
         try {
-            delegate = delegateClass.newInstance();
-        } catch (final InstantiationException | IllegalAccessException e) {
+            delegate = delegateClass.getDeclaredConstructor().newInstance();
+        } catch (final InstantiationException | IllegalAccessException | IllegalArgumentException |
+                InvocationTargetException | NoSuchMethodException | SecurityException e) {
             throw new RuntimeException(e);
         }
         

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


More information about the commits mailing list