pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1854931 - /pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java
Date Wed, 06 Mar 2019 17:06:55 GMT
Author: tilman
Date: Wed Mar  6 17:06:55 2019
New Revision: 1854931

URL: http://svn.apache.org/viewvc?rev=1854931&view=rev
Log:
PDFBOX-3017: replace method that is deprecated in later jdk versions

Modified:
    pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java

Modified: pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java?rev=1854931&r1=1854930&r2=1854931&view=diff
==============================================================================
--- pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java
(original)
+++ pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/validation/AddValidationInformation.java
Wed Mar  6 17:06:55 2019
@@ -188,9 +188,9 @@ public class AddValidationInformation
         {
             try
             {
-                result = clazz.newInstance();
+                result = clazz.getDeclaredConstructor().newInstance();
             }
-            catch (InstantiationException | IllegalAccessException e)
+            catch (ReflectiveOperationException | SecurityException e)
             {
                 LOG.error("Failed to create new instance of " + clazz.getCanonicalName(),
e);
                 return null;



Mime
View raw message