pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1792765 - /pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java
Date Wed, 26 Apr 2017 16:44:06 GMT
Author: tilman
Date: Wed Apr 26 16:44:06 2017
New Revision: 1792765

URL: http://svn.apache.org/viewvc?rev=1792765&view=rev
Log:
PDFBOX-3766: replace method deprecated in jdk9

Modified:
    pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java

Modified: pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java?rev=1792765&r1=1792764&r2=1792765&view=diff
==============================================================================
--- pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java
(original)
+++ pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java
Wed Apr 26 16:44:06 2017
@@ -182,13 +182,9 @@ public class PreflightConfiguration
 
         try
         {
-            return clazz.newInstance();
+            return clazz.getDeclaredConstructor().newInstance();
         }
-        catch (InstantiationException e)
-        {
-            throw new ValidationException(processName + " can't be created", e);
-        }
-        catch (IllegalAccessException e)
+        catch (ReflectiveOperationException e)
         {
             throw new ValidationException(processName + " can't be created", e);
         }



Mime
View raw message