Author: tilman
Date: Mon Oct 27 12:03:41 2025
New Revision: 1929362

Log:
PDFBOX-5660: sonar fix: use specific exceptions

Modified:
   
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/TestInvalidDirectory.java
   
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/TestIsartorBavaria.java
   
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/TestValidDirectory.java
   
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestInvalidFiles.java
   
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestIsartorValidation.java
   
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestValidFiles.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/TestValidatePermitedMetadata.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/TestXMPWithDefinedSchemas.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/AdobePDFTest.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/DublinCoreTest.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/PDFAIdentificationTest.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/PhotoshopSchemaTest.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/XMPBasicTest.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/XMPMediaManagementTest.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/XmpRightsSchemaTest.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestDerivedType.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestJobType.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestLayerType.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestResourceEventType.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestResourceRefType.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestThumbnailType.java
   
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestVersionType.java

Modified: 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/TestInvalidDirectory.java
==============================================================================
--- 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/TestInvalidDirectory.java
   Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/TestInvalidDirectory.java
   Mon Oct 27 12:03:41 2025        (r1929362)
@@ -22,6 +22,7 @@
 package org.apache.pdfbox.preflight;
 
 import java.io.File;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -74,14 +75,13 @@ public class TestInvalidDirectory
             }
         }
         Assert.assertFalse("Test of " + target, result.isValid());
-
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters() throws 
IOException
     {
         // check directory
-        File directory = null;
+        File dir = null;
         String pdfPath = System.getProperty("pdfa.invalid", null);
         if ("${user.pdfa.invalid}".equals(pdfPath))
         {
@@ -89,24 +89,28 @@ public class TestInvalidDirectory
         }
         if (pdfPath != null)
         {
-            directory = new File(pdfPath);
-            if (!directory.exists())
-                throw new Exception("directory does not exists : " + 
directory.getAbsolutePath());
-            if (!directory.isDirectory())
-                throw new Exception("not a directory : " + 
directory.getAbsolutePath());
+            dir = new File(pdfPath);
+            if (!dir.exists())
+            {
+                throw new IOException("directory does not exists : " + 
dir.getAbsolutePath());
+            }
+            if (!dir.isDirectory())
+            {
+                throw new IOException("not a directory : " + 
dir.getAbsolutePath());
+            }
         }
         else
         {
             System.err.println("System property 'pdfa.invalid' not defined, 
will not run TestValidaDirectory");
         }
         // create list
-        if (directory == null)
+        if (dir == null)
         {
             return new ArrayList<Object[]>(0);
         }
         else
         {
-            File[] files = directory.listFiles();
+            File[] files = dir.listFiles();
             List<Object[]> data = new ArrayList<Object[]>(files.length);
             for (File file : files)
             {

Modified: 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/TestIsartorBavaria.java
==============================================================================
--- 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/TestIsartorBavaria.java
     Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/TestIsartorBavaria.java
     Mon Oct 27 12:03:41 2025        (r1929362)
@@ -24,6 +24,7 @@ package org.apache.pdfbox.preflight;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
+import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -58,7 +59,7 @@ public class TestIsartorBavaria
     private static FileOutputStream isartorResultFile;
 
     @Parameters(name = "{0}")
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters() throws 
IOException
     {
         String filter = System.getProperty(FILTER_FILE);
         String skipBavaria = System.getProperty(SKIP_BAVARIA);

Modified: 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/TestValidDirectory.java
==============================================================================
--- 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/TestValidDirectory.java
     Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/TestValidDirectory.java
     Mon Oct 27 12:03:41 2025        (r1929362)
@@ -22,6 +22,7 @@
 package org.apache.pdfbox.preflight;
 
 import java.io.File;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -74,7 +75,7 @@ public class TestValidDirectory
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters() throws 
IOException
     {
         // check directory
         File directory = null;
@@ -87,9 +88,13 @@ public class TestValidDirectory
         {
             directory = new File(pdfPath);
             if (!directory.exists())
-                throw new Exception("directory does not exists : " + 
directory.getAbsolutePath());
+            {
+                throw new IOException("directory does not exists : " + 
directory.getAbsolutePath());
+            }
             if (!directory.isDirectory())
-                throw new Exception("not a directory : " + 
directory.getAbsolutePath());
+            {
+                throw new IOException("not a directory : " + 
directory.getAbsolutePath());
+            }
         }
         else
         {

Modified: 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestInvalidFiles.java
==============================================================================
--- 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestInvalidFiles.java
   Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestInvalidFiles.java
   Mon Oct 27 12:03:41 2025        (r1929362)
@@ -23,6 +23,7 @@ package org.apache.pdfbox.preflight.inte
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -55,7 +56,7 @@ public class TestInvalidFiles extends Ab
         super(path, error);
     }
 
-    protected static Collection<Object[]> stopIfExpected() throws Exception
+    protected static Collection<Object[]> stopIfExpected()
     {
         List<Object[]> ret = new ArrayList<Object[]>();
         ret.add(new Object[] { null, null });
@@ -63,7 +64,7 @@ public class TestInvalidFiles extends Ab
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters() throws 
IOException
     {
         // find isartor files
         String isartor = System.getProperty(ISARTOR_FILES);

Modified: 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestIsartorValidation.java
==============================================================================
--- 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestIsartorValidation.java
      Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestIsartorValidation.java
      Mon Oct 27 12:03:41 2025        (r1929362)
@@ -23,6 +23,7 @@ package org.apache.pdfbox.preflight.inte
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -55,7 +56,7 @@ public class TestIsartorValidation exten
         super(path, error);
     }
 
-    protected static Collection<Object[]> stopIfExpected() throws Exception
+    protected static Collection<Object[]> stopIfExpected()
     {
         List<Object[]> ret = new ArrayList<Object[]>();
         ret.add(new Object[] { null, null });
@@ -63,7 +64,7 @@ public class TestIsartorValidation exten
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters() throws 
IOException
     {
         // find isartor files
         String isartor = System.getProperty(ISARTOR_FILES);

Modified: 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestValidFiles.java
==============================================================================
--- 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestValidFiles.java
     Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestValidFiles.java
     Mon Oct 27 12:03:41 2025        (r1929362)
@@ -23,6 +23,7 @@ package org.apache.pdfbox.preflight.inte
 
 import java.io.File;
 import java.io.FileOutputStream;
+import java.io.IOException;
 import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -66,7 +67,7 @@ public class TestValidFiles
         this.logger = LogFactory.getLog(path != null ? path.getName() : 
"dummy");
     }
 
-    protected static Collection<Object[]> stopIfExpected() throws Exception
+    protected static Collection<Object[]> stopIfExpected()
     {
         // throw new Exception("Test badly configured");
         List<Object[]> ret = new ArrayList<Object[]>();
@@ -75,7 +76,7 @@ public class TestValidFiles
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters() throws 
IOException
     {
         // find isartor files
         String isartor = System.getProperty(ISARTOR_FILES);
@@ -100,7 +101,7 @@ public class TestValidFiles
     }
 
     @BeforeClass
-    public static void beforeClass() throws Exception
+    public static void beforeClass() throws IOException
     {
         String irp = System.getProperty(RESULTS_FILE);
         if (irp == null)
@@ -116,7 +117,7 @@ public class TestValidFiles
     }
 
     @AfterClass
-    public static void afterClass() throws Exception
+    public static void afterClass()
     {
         IOUtils.closeQuietly(isartorResultFile);
     }

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/TestValidatePermitedMetadata.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/TestValidatePermitedMetadata.java
        Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/TestValidatePermitedMetadata.java
        Mon Oct 27 12:03:41 2025        (r1929362)
@@ -31,6 +31,7 @@ import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
 
 import java.io.BufferedReader;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.lang.reflect.Field;
@@ -46,7 +47,7 @@ public class TestValidatePermitedMetadat
 {
 
     @Parameters(name="{0} {1} {2}")
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters() throws 
IOException
     {
         List<Object[]> params = new ArrayList<Object[]>();
         InputStream is =  
TestValidatePermitedMetadata.class.getResourceAsStream("/permited_metadata.txt");

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/TestXMPWithDefinedSchemas.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/TestXMPWithDefinedSchemas.java
   Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/TestXMPWithDefinedSchemas.java
   Mon Oct 27 12:03:41 2025        (r1929362)
@@ -27,6 +27,7 @@ import java.util.Collection;
 import java.util.List;
 
 import org.apache.xmpbox.xml.DomXmpParser;
+import org.apache.xmpbox.xml.XmpParsingException;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -37,7 +38,7 @@ public class TestXMPWithDefinedSchemas
 {
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters()
     {
         List<Object[]> data = new ArrayList<Object[]>();
         data.add(new Object[] { "/validxmp/override_ns.rdf" });
@@ -56,7 +57,7 @@ public class TestXMPWithDefinedSchemas
     }
 
     @Test
-    public void main() throws Exception
+    public void main() throws XmpParsingException
     {
 
         InputStream is = this.getClass().getResourceAsStream(path);

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/AdobePDFTest.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/AdobePDFTest.java
 Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/AdobePDFTest.java
 Mon Oct 27 12:03:41 2025        (r1929362)
@@ -49,13 +49,12 @@ public class AdobePDFTest extends Abstra
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters()
     {
         List<Object[]> data = new ArrayList<Object[]>();
         data.add(wrapProperty("Keywords", Types.Text, "kw1 kw2 kw3"));
         data.add(wrapProperty("PDFVersion", Types.Text, "1.4"));
         data.add(wrapProperty("Producer", Types.Text, "testcase"));
-
         return data;
     }
 
@@ -65,7 +64,7 @@ public class AdobePDFTest extends Abstra
     }
 
     @Test
-    public void testPDFAIdentification() throws Exception
+    public void testPDFAIdentification()
     {
         AdobePDFSchema schem = metadata.createAndAddAdobePDFSchema();
 

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/DublinCoreTest.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/DublinCoreTest.java
       Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/DublinCoreTest.java
       Mon Oct 27 12:03:41 2025        (r1929362)
@@ -25,6 +25,7 @@ import java.util.Collection;
 
 import org.apache.xmpbox.type.Cardinality;
 import org.apache.xmpbox.type.Types;
+import org.apache.xmpbox.xml.XmpParsingException;
 import org.junit.Before;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -34,13 +35,15 @@ import org.junit.runners.Parameterized.P
 public class DublinCoreTest extends AbstractSchemaTester
 {
 
+    @Override
     public DublinCoreSchema getSchema()
     {
         return xmp.createAndAddDublinCoreSchema();
     }
 
     @Before
-    public void before() throws Exception
+    @Override
+    public void before() throws XmpParsingException
     {
         super.before();
     }
@@ -51,7 +54,7 @@ public class DublinCoreTest extends Abst
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters()
     {
         Collection<Object[]> result = new ArrayList<Object[]>();
 

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/PDFAIdentificationTest.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/PDFAIdentificationTest.java
       Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/PDFAIdentificationTest.java
       Mon Oct 27 12:03:41 2025        (r1929362)
@@ -38,7 +38,7 @@ public class PDFAIdentificationTest exte
 {
 
     @Before
-    public void initTempMetaData() throws Exception
+    public void initTempMetaData()
     {
         metadata = XMPMetadata.createXMPMetadata();
         schema = metadata.createAndAddPDFAIdentificationSchema();
@@ -46,7 +46,7 @@ public class PDFAIdentificationTest exte
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters()
     {
         List<Object[]> data = new ArrayList<Object[]>();
         data.add(wrapProperty("part", Types.Integer, 1));

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/PhotoshopSchemaTest.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/PhotoshopSchemaTest.java
  Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/PhotoshopSchemaTest.java
  Mon Oct 27 12:03:41 2025        (r1929362)
@@ -25,6 +25,7 @@ import java.util.Collection;
 
 import org.apache.xmpbox.type.Cardinality;
 import org.apache.xmpbox.type.Types;
+import org.apache.xmpbox.xml.XmpParsingException;
 import org.junit.Before;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -42,7 +43,7 @@ public class PhotoshopSchemaTest extends
 
     @Before
     @Override
-    public void before() throws Exception
+    public void before() throws XmpParsingException
     {
         super.before();
     }
@@ -53,7 +54,7 @@ public class PhotoshopSchemaTest extends
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters()
     {
         Collection<Object[]> result = new ArrayList<Object[]>();
 

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/XMPBasicTest.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/XMPBasicTest.java
 Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/XMPBasicTest.java
 Mon Oct 27 12:03:41 2025        (r1929362)
@@ -53,7 +53,7 @@ public class XMPBasicTest extends Abstra
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters()
     {
         List<Object[]> data = new ArrayList<Object[]>();
 

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/XMPMediaManagementTest.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/XMPMediaManagementTest.java
       Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/XMPMediaManagementTest.java
       Mon Oct 27 12:03:41 2025        (r1929362)
@@ -39,7 +39,7 @@ public class XMPMediaManagementTest exte
 {
 
     @Before
-    public void initTempMetaData() throws Exception
+    public void initTempMetaData()
     {
         metadata = XMPMetadata.createXMPMetadata();
         schema = metadata.createAndAddXMPMediaManagementSchema();
@@ -47,7 +47,7 @@ public class XMPMediaManagementTest exte
     }
 
     @Parameters(name = "{0} {1} '{2}'")
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters()
     {
         List<Object[]> data = new ArrayList<Object[]>();
         data.add(wrapProperty("DocumentID", Types.URI, 
"uuid:FB031973-5E75-11B2-8F06-E7F5C101C07A"));

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/XmpRightsSchemaTest.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/XmpRightsSchemaTest.java
  Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/XmpRightsSchemaTest.java
  Mon Oct 27 12:03:41 2025        (r1929362)
@@ -46,7 +46,7 @@ public class XmpRightsSchemaTest extends
     }
 
     @Before
-    public void initTempMetaData() throws Exception
+    public void initTempMetaData()
     {
         metadata = XMPMetadata.createXMPMetadata();
         schema = metadata.createAndAddXMPRightsManagementSchema();
@@ -54,7 +54,7 @@ public class XmpRightsSchemaTest extends
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters()
     {
         List<Object[]> data = new ArrayList<Object[]>();
         data.add(wrapProperty("Certificate", Types.URL, 
"http://une.url.vers.un.certificat/moncert.cer";));

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestDerivedType.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestDerivedType.java
        Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestDerivedType.java
        Mon Oct 27 12:03:41 2025        (r1929362)
@@ -58,7 +58,7 @@ public class TestDerivedType
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters()
     {
         Collection<Object[]> result = new ArrayList<Object[]>();
 
@@ -79,7 +79,7 @@ public class TestDerivedType
     }
 
     @Before
-    public void before() throws Exception
+    public void before() throws NoSuchMethodException
     {
         xmp = XMPMetadata.createXMPMetadata();
         constructor = clz.getDeclaredConstructor(XMPMetadata.class, 
String.class, String.class, String.class,

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestJobType.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestJobType.java
    Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestJobType.java
    Mon Oct 27 12:03:41 2025        (r1929362)
@@ -23,6 +23,7 @@ package org.apache.xmpbox.type;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import org.apache.xmpbox.xml.XmpParsingException;
 
 import org.junit.Before;
 import org.junit.runner.RunWith;
@@ -34,7 +35,7 @@ public class TestJobType extends Abstrac
 {
 
     @Before
-    public void before() throws Exception
+    public void before() throws XmpParsingException
     {
         super.before();
     }
@@ -51,7 +52,7 @@ public class TestJobType extends Abstrac
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters()
     {
         Collection<Object[]> result = new ArrayList<Object[]>();
 

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestLayerType.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestLayerType.java
  Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestLayerType.java
  Mon Oct 27 12:03:41 2025        (r1929362)
@@ -23,6 +23,7 @@ package org.apache.xmpbox.type;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import org.apache.xmpbox.xml.XmpParsingException;
 
 import org.junit.Before;
 import org.junit.runner.RunWith;
@@ -34,7 +35,7 @@ public class TestLayerType extends Abstr
 {
 
     @Before
-    public void before() throws Exception
+    public void before() throws XmpParsingException
     {
         super.before();
     }
@@ -51,7 +52,7 @@ public class TestLayerType extends Abstr
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters()
     {
         Collection<Object[]> result = new ArrayList<Object[]>();
 

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestResourceEventType.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestResourceEventType.java
  Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestResourceEventType.java
  Mon Oct 27 12:03:41 2025        (r1929362)
@@ -23,6 +23,7 @@ package org.apache.xmpbox.type;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import org.apache.xmpbox.xml.XmpParsingException;
 
 import org.junit.Before;
 import org.junit.runner.RunWith;
@@ -34,7 +35,8 @@ public class TestResourceEventType exten
 {
 
     @Before
-    public void before() throws Exception
+    @Override
+    public void before() throws XmpParsingException
     {
         super.before();
     }
@@ -51,7 +53,7 @@ public class TestResourceEventType exten
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters()
     {
         Collection<Object[]> result = new ArrayList<Object[]>();
 

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestResourceRefType.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestResourceRefType.java
    Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestResourceRefType.java
    Mon Oct 27 12:03:41 2025        (r1929362)
@@ -23,6 +23,7 @@ package org.apache.xmpbox.type;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import org.apache.xmpbox.xml.XmpParsingException;
 
 import org.junit.Before;
 import org.junit.runner.RunWith;
@@ -34,7 +35,7 @@ public class TestResourceRefType extends
 {
 
     @Before
-    public void before() throws Exception
+    public void before() throws XmpParsingException
     {
         super.before();
     }
@@ -51,7 +52,7 @@ public class TestResourceRefType extends
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters()
     {
         Collection<Object[]> result = new ArrayList<Object[]>();
 

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestThumbnailType.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestThumbnailType.java
      Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestThumbnailType.java
      Mon Oct 27 12:03:41 2025        (r1929362)
@@ -23,6 +23,7 @@ package org.apache.xmpbox.type;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import org.apache.xmpbox.xml.XmpParsingException;
 
 import org.junit.Before;
 import org.junit.runner.RunWith;
@@ -34,7 +35,8 @@ public class TestThumbnailType extends A
 {
 
     @Before
-    public void before() throws Exception
+    @Override
+    public void before() throws XmpParsingException
     {
         super.before();
     }
@@ -51,7 +53,7 @@ public class TestThumbnailType extends A
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters()
     {
         Collection<Object[]> result = new ArrayList<Object[]>();
 

Modified: 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestVersionType.java
==============================================================================
--- 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestVersionType.java
        Mon Oct 27 10:30:41 2025        (r1929361)
+++ 
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/type/TestVersionType.java
        Mon Oct 27 12:03:41 2025        (r1929362)
@@ -23,6 +23,7 @@ package org.apache.xmpbox.type;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import org.apache.xmpbox.xml.XmpParsingException;
 
 import org.junit.Before;
 import org.junit.runner.RunWith;
@@ -34,7 +35,8 @@ public class TestVersionType extends Abs
 {
 
     @Before
-    public void before() throws Exception
+    @Override
+    public void before() throws XmpParsingException
     {
         super.before();
     }
@@ -51,7 +53,7 @@ public class TestVersionType extends Abs
     }
 
     @Parameters
-    public static Collection<Object[]> initializeParameters() throws Exception
+    public static Collection<Object[]> initializeParameters()
     {
         Collection<Object[]> result = new ArrayList<Object[]>();
 

Reply via email to