pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1792782 - in /pdfbox/branches/1.8: preflight/src/main/java/org/apache/pdfbox/preflight/ preflight/src/main/java/org/apache/pdfbox/preflight/annotation/ xmpbox/src/main/java/org/apache/xmpbox/schema/ xmpbox/src/main/java/org/apache/xmpbox/t...
Date Wed, 26 Apr 2017 17:34:24 GMT
Author: tilman
Date: Wed Apr 26 17:34:24 2017
New Revision: 1792782

URL: http://svn.apache.org/viewvc?rev=1792782&view=rev
Log:
PDFBOX-3766: revert all changes to exception handling

Modified:
    pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java
    pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/AnnotationValidatorFactory.java
    pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/schema/XMPSchemaFactory.java
    pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java

Modified: pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java?rev=1792782&r1=1792781&r2=1792782&view=diff
==============================================================================
--- pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java
(original)
+++ pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java
Wed Apr 26 17:34:24 2017
@@ -180,10 +180,15 @@ public class PreflightConfiguration
         {
             return clazz.getDeclaredConstructor().newInstance();
         }
-        catch (ReflectiveOperationException e)
+        catch (InstantiationException e)
         {
             throw new ValidationException(processName + " can't be created", e);
         }
+        catch (IllegalAccessException e)
+        {
+            throw new ValidationException(processName + " can't be created", e);
+        }
+
     }
 
     public void replaceProcess(String processName, Class<? extends ValidationProcess>
process)

Modified: pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/AnnotationValidatorFactory.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/AnnotationValidatorFactory.java?rev=1792782&r1=1792781&r2=1792782&view=diff
==============================================================================
--- pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/AnnotationValidatorFactory.java
(original)
+++ pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/AnnotationValidatorFactory.java
Wed Apr 26 17:34:24 2017
@@ -90,7 +90,7 @@ public abstract class AnnotationValidato
                 result = constructor.newInstance(ctx, annotDic);
                 result.setFactory(this);
             }
-            catch (ReflectiveOperationException e)
+            catch (Exception e)
             {
                 throw new ValidationException(e.getMessage(), e);
             }

Modified: pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/schema/XMPSchemaFactory.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/schema/XMPSchemaFactory.java?rev=1792782&r1=1792781&r2=1792782&view=diff
==============================================================================
--- pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/schema/XMPSchemaFactory.java
(original)
+++ pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/schema/XMPSchemaFactory.java
Wed Apr 26 17:34:24 2017
@@ -124,9 +124,9 @@ public class XMPSchemaFactory
             }
             return schema;
         }
-        catch (ReflectiveOperationException e)
+        catch (Exception e)
         {
-            throw new XmpSchemaException("Cannot Instanciate specified Object Schema", e);
+            throw new XmpSchemaException("Cannot instanciate specified object achema", e);
         }
     }
 

Modified: pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java?rev=1792782&r1=1792781&r2=1792782&view=diff
==============================================================================
--- pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java (original)
+++ pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java Wed Apr
26 17:34:24 2017
@@ -133,7 +133,7 @@ public final class TypeMapping
             tmp.setPropertyName(propertyName);
             return tmp;
         }
-        catch (ReflectiveOperationException e)
+        catch (InvocationTargetException e)
         {
             throw new BadFieldValueException("Failed to instanciate structured type : " +
type, e);
         }
@@ -141,6 +141,22 @@ public final class TypeMapping
         {
             throw new BadFieldValueException("Failed to instanciate structured type : " +
type, e);
         }
+        catch (InstantiationException e)
+        {
+            throw new BadFieldValueException("Failed to instanciate structured type : " +
type, e);
+        }
+        catch (IllegalAccessException e)
+        {
+            throw new BadFieldValueException("Failed to instanciate structured type : " +
type, e);
+        }
+        catch (SecurityException e)
+        {
+            throw new BadFieldValueException("Failed to instanciate structured type : " +
type, e);
+        }
+        catch (NoSuchMethodException e)
+        {
+            throw new BadFieldValueException("Failed to instanciate structured type : " +
type, e);
+        }
     }
 
     public AbstractStructuredType instanciateDefinedType(String propertyName, String namespace)



Mime
View raw message