Author: tilman
Date: Sat Apr 12 16:17:44 2025
New Revision: 1925050

URL: http://svn.apache.org/viewvc?rev=1925050&view=rev
Log:
PDFBOX-5660: Sonar fix

Modified:
    
pdfbox/trunk/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java
    
pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestPublicKeyEncryption.java
    
pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java
    pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/DateConverterTest.java
    
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/TestValidatePermitedMetadata.java
    
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/TestXMPWithUndefinedSchemas.java
    
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/DublinCoreTest.java
    
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/PhotoshopSchemaTest.java
    pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/SchemaTester.java
    
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/type/TestDerivedType.java

Modified: 
pdfbox/trunk/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java?rev=1925050&r1=1925049&r2=1925050&view=diff
==============================================================================
--- 
pdfbox/trunk/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java
 (original)
+++ 
pdfbox/trunk/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java
 Sat Apr 12 16:17:44 2025
@@ -707,11 +707,13 @@ class TestCreateSignature
      * This should not break the signature, and the value and its display must 
have changed as
      * expected. Do this both for the old and new incremental save methods.
      *
-     * @throws Exception
+     * @throws IOException
      */
     @ParameterizedTest
     @MethodSource("signingTypes")
-    void testSaveIncrementalAfterSign(boolean externallySign) throws Exception
+    void testSaveIncrementalAfterSign(boolean externallySign)
+            throws IOException, GeneralSecurityException, CMSException, 
OperatorCreationException,
+            TSPException, CertificateVerificationException
     {
         BufferedImage oldImage, expectedImage1, actualImage1, expectedImage2, 
actualImage2;
 
@@ -816,7 +818,7 @@ class TestCreateSignature
     }
 
     @Test
-    void testPDFBox4784() throws Exception
+    void testPDFBox4784() throws IOException, GeneralSecurityException
     {
         Date signingTime = new Date();
 
@@ -1085,7 +1087,7 @@ class TestCreateSignature
         }
     }
 
-    private byte[] signEncrypted(SecureRandom secureRandom, Date signingTime) 
throws Exception
+    private byte[] signEncrypted(SecureRandom secureRandom, Date signingTime) 
throws IOException, GeneralSecurityException
     {
         KeyStore keystore = KeyStore.getInstance("PKCS12");
         keystore.load(new FileInputStream(KEYSTORE_PATH), 
PASSWORD.toCharArray());

Modified: 
pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestPublicKeyEncryption.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestPublicKeyEncryption.java?rev=1925050&r1=1925049&r2=1925050&view=diff
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestPublicKeyEncryption.java
 (original)
+++ 
pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestPublicKeyEncryption.java
 Sat Apr 12 16:17:44 2025
@@ -157,11 +157,11 @@ class TestPublicKeyEncryption
      * Protect a document with certificate 1 and try to open it with
      * certificate 2 and catch the exception.
      *
-     * @throws Exception If there is an unexpected error during the test.
+     * @throws IOException If there is an unexpected error during the test.
      */
     @ParameterizedTest
     @MethodSource("keyLengths")
-    void testProtectionError(int keyLength) throws Exception
+    void testProtectionError(int keyLength) throws IOException
     {
         PublicKeyProtectionPolicy policy = new PublicKeyProtectionPolicy();
         policy.addRecipient(recipient1);
@@ -186,11 +186,11 @@ class TestPublicKeyEncryption
      * Protect a document with a public certificate and try to open it
      * with the corresponding private certificate.
      *
-     * @throws Exception If there is an unexpected error during the test.
+     * @throws IOException If there is an unexpected error during the test.
      */
     @ParameterizedTest
     @MethodSource("keyLengths")
-    void testProtection(int keyLength) throws Exception
+    void testProtection(int keyLength) throws IOException
     {
         PublicKeyProtectionPolicy policy = new PublicKeyProtectionPolicy();
         policy.addRecipient(recipient1);
@@ -218,11 +218,11 @@ class TestPublicKeyEncryption
     /**
      * Protect the document for 2 recipients and try to open it.
      *
-     * @throws Exception If there is an error during the test.
+     * @throws IOException If there is an error during the test.
      */
     @ParameterizedTest
     @MethodSource("keyLengths")
-    void testMultipleRecipients(int keyLength) throws Exception
+    void testMultipleRecipients(int keyLength) throws IOException
     {
         PublicKeyProtectionPolicy policy = new PublicKeyProtectionPolicy();
         policy.addRecipient(recipient1);

Modified: 
pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java?rev=1925050&r1=1925049&r2=1925050&view=diff
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java
 (original)
+++ 
pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java
 Sat Apr 12 16:17:44 2025
@@ -289,10 +289,10 @@ class TestSymmetricKeyEncryption
      * Protect a document with an embedded PDF with a key and try to reopen it
      * with that key and compare.
      *
-     * @throws Exception If there is an unexpected error during the test.
+     * @throws IOException If there is an unexpected error during the test.
      */
     @Test
-    void testProtectionInnerAttachment() throws Exception
+    void testProtectionInnerAttachment() throws IOException
     {
         String testFileName = "preEnc_20141025_105451.pdf";
         byte[] inputFileWithEmbeddedFileAsByteArray = 
getFileResourceAsByteArray(testFileName);

Modified: 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/DateConverterTest.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/DateConverterTest.java?rev=1925050&r1=1925049&r2=1925050&view=diff
==============================================================================
--- pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/DateConverterTest.java 
(original)
+++ pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/DateConverterTest.java 
Sat Apr 12 16:17:44 2025
@@ -123,10 +123,10 @@ class DateConverterTest
      * Test with additional time zone
      * information normally not supported by ISO8601
      *
-     * @throws Exception when there is an exception
+     * @throws IOException when there is an exception
      */
     @Test
-    void testDateFormatting() throws Exception
+    void testDateFormatting() throws IOException
     {
         final SimpleDateFormat dateFormat = new 
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
         Calendar cal = DateConverter.toCalendar("2015-02-02T16:37:19.192Z");

Modified: 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/TestValidatePermitedMetadata.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/TestValidatePermitedMetadata.java?rev=1925050&r1=1925049&r2=1925050&view=diff
==============================================================================
--- 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/TestValidatePermitedMetadata.java
 (original)
+++ 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/TestValidatePermitedMetadata.java
 Sat Apr 12 16:17:44 2025
@@ -41,6 +41,7 @@ import java.nio.charset.StandardCharsets
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
+import org.apache.xmpbox.schema.XmpSchemaException;
 
 class TestValidatePermitedMetadata
 {
@@ -71,7 +72,8 @@ class TestValidatePermitedMetadata
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void checkExistence(String namespace, String preferred, String fieldname) 
throws Exception
+    void checkExistence(String namespace, String preferred, String fieldname)
+            throws XmpSchemaException, IllegalArgumentException, 
IllegalAccessException
     {
         // ensure schema exists
         XMPMetadata xmpmd = new XMPMetadata();

Modified: 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/TestXMPWithUndefinedSchemas.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/TestXMPWithUndefinedSchemas.java?rev=1925050&r1=1925049&r2=1925050&view=diff
==============================================================================
--- 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/TestXMPWithUndefinedSchemas.java
 (original)
+++ 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/TestXMPWithUndefinedSchemas.java
 Sat Apr 12 16:17:44 2025
@@ -28,9 +28,11 @@ import static org.junit.jupiter.api.Asse
 
 import java.io.InputStream;
 import java.util.stream.Stream;
+import org.apache.xmpbox.type.BadFieldValueException;
 
 
 import org.apache.xmpbox.xml.DomXmpParser;
+import org.apache.xmpbox.xml.XmpParsingException;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.Arguments;
 import org.junit.jupiter.params.provider.MethodSource;
@@ -46,7 +48,8 @@ class TestXMPWithUndefinedSchemas
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void main(String path, String namespace, String propertyName, String 
propertyValue) throws Exception
+    void main(String path, String namespace, String propertyName, String 
propertyValue)
+            throws XmpParsingException, BadFieldValueException
     {
         InputStream is = this.getClass().getResourceAsStream(path);
 

Modified: 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/DublinCoreTest.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/DublinCoreTest.java?rev=1925050&r1=1925049&r2=1925050&view=diff
==============================================================================
--- 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/DublinCoreTest.java 
(original)
+++ 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/DublinCoreTest.java 
Sat Apr 12 16:17:44 2025
@@ -54,7 +54,8 @@ class DublinCoreTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testSettingValue(String fieldName, Types type, Cardinality card) 
throws Exception
+    void testSettingValue(String fieldName, Types type, Cardinality card)
+            throws IllegalArgumentException, IllegalAccessException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testSettingValue();
@@ -62,7 +63,8 @@ class DublinCoreTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testRandomSettingValue(String fieldName, Types type, Cardinality 
card) throws Exception
+    void testRandomSettingValue(String fieldName, Types type, Cardinality card)
+            throws IllegalArgumentException, IllegalAccessException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testRandomSettingValue();
@@ -70,7 +72,8 @@ class DublinCoreTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testSettingValueInArray(String fieldName, Types type, Cardinality 
card) throws Exception
+    void testSettingValueInArray(String fieldName, Types type, Cardinality 
card)
+            throws IllegalArgumentException, IllegalAccessException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testSettingValueInArray();
@@ -78,7 +81,8 @@ class DublinCoreTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testRandomSettingValueInArray(String fieldName, Types type, 
Cardinality card) throws Exception
+    void testRandomSettingValueInArray(String fieldName, Types type, 
Cardinality card)
+            throws IllegalArgumentException, IllegalAccessException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testRandomSettingValueInArray();
@@ -86,7 +90,7 @@ class DublinCoreTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testPropertySetterSimple(String fieldName, Types type, Cardinality 
card) throws Exception
+    void testPropertySetterSimple(String fieldName, Types type, Cardinality 
card) throws ReflectiveOperationException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testPropertySetterSimple();
@@ -94,7 +98,7 @@ class DublinCoreTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testRandomPropertySetterSimple(String fieldName, Types type, 
Cardinality card) throws Exception
+    void testRandomPropertySetterSimple(String fieldName, Types type, 
Cardinality card) throws ReflectiveOperationException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testRandomPropertySetterSimple();
@@ -102,7 +106,7 @@ class DublinCoreTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testPropertySetterInArray(String fieldName, Types type, Cardinality 
card) throws Exception
+    void testPropertySetterInArray(String fieldName, Types type, Cardinality 
card) throws ReflectiveOperationException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testPropertySetterInArray();
@@ -110,7 +114,7 @@ class DublinCoreTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testRandomPropertySetterInArray(String fieldName, Types type, 
Cardinality card) throws Exception
+    void testRandomPropertySetterInArray(String fieldName, Types type, 
Cardinality card) throws ReflectiveOperationException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testRandomPropertySetterInArray();

Modified: 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/PhotoshopSchemaTest.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/PhotoshopSchemaTest.java?rev=1925050&r1=1925049&r2=1925050&view=diff
==============================================================================
--- 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/PhotoshopSchemaTest.java
 (original)
+++ 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/PhotoshopSchemaTest.java
 Sat Apr 12 16:17:44 2025
@@ -52,7 +52,8 @@ class PhotoshopSchemaTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testSettingValue(String fieldName, Types type, Cardinality card) 
throws Exception
+    void testSettingValue(String fieldName, Types type, Cardinality card)
+            throws IllegalArgumentException, IllegalAccessException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testSettingValue();
@@ -60,7 +61,8 @@ class PhotoshopSchemaTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testRandomSettingValue(String fieldName, Types type, Cardinality 
card) throws Exception
+    void testRandomSettingValue(String fieldName, Types type, Cardinality card)
+            throws IllegalArgumentException, IllegalAccessException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testRandomSettingValue();
@@ -68,7 +70,8 @@ class PhotoshopSchemaTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testSettingValueInArray(String fieldName, Types type, Cardinality 
card) throws Exception
+    void testSettingValueInArray(String fieldName, Types type, Cardinality 
card)
+            throws IllegalArgumentException, IllegalAccessException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testSettingValueInArray();
@@ -76,7 +79,8 @@ class PhotoshopSchemaTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testRandomSettingValueInArray(String fieldName, Types type, 
Cardinality card) throws Exception
+    void testRandomSettingValueInArray(String fieldName, Types type, 
Cardinality card)
+            throws IllegalArgumentException, IllegalAccessException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testRandomSettingValueInArray();
@@ -84,7 +88,8 @@ class PhotoshopSchemaTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testPropertySetterSimple(String fieldName, Types type, Cardinality 
card) throws Exception
+    void testPropertySetterSimple(String fieldName, Types type, Cardinality 
card)
+            throws ReflectiveOperationException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testPropertySetterSimple();
@@ -92,7 +97,8 @@ class PhotoshopSchemaTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testRandomPropertySetterSimple(String fieldName, Types type, 
Cardinality card) throws Exception
+    void testRandomPropertySetterSimple(String fieldName, Types type, 
Cardinality card)
+            throws ReflectiveOperationException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testRandomPropertySetterSimple();
@@ -100,7 +106,8 @@ class PhotoshopSchemaTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testPropertySetterInArray(String fieldName, Types type, Cardinality 
card) throws Exception
+    void testPropertySetterInArray(String fieldName, Types type, Cardinality 
card)
+            throws ReflectiveOperationException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testPropertySetterInArray();
@@ -108,7 +115,8 @@ class PhotoshopSchemaTest
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void testRandomPropertySetterInArray(String fieldName, Types type, 
Cardinality card) throws Exception
+    void testRandomPropertySetterInArray(String fieldName, Types type, 
Cardinality card)
+            throws ReflectiveOperationException
     {
         SchemaTester schemaTester = new SchemaTester(metadata, schemaClass, 
fieldName, type, card);
         schemaTester.testRandomPropertySetterInArray();

Modified: 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/SchemaTester.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/SchemaTester.java?rev=1925050&r1=1925049&r2=1925050&view=diff
==============================================================================
--- 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/SchemaTester.java 
(original)
+++ 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/SchemaTester.java 
Sat Apr 12 16:17:44 2025
@@ -95,12 +95,12 @@ class SchemaTester extends AbstractTypeT
 
     }
 
-    public void testSettingValue() throws Exception
+    public void testSettingValue() throws IllegalArgumentException, 
IllegalAccessException
     {
         internalTestSettingValue();
     }
 
-    public void testRandomSettingValue() throws Exception
+    public void testRandomSettingValue() throws IllegalArgumentException, 
IllegalAccessException
     {
         initializeSeed(new Random());
         for (int i=0; i < RAND_LOOP_COUNT;i++)
@@ -109,7 +109,7 @@ class SchemaTester extends AbstractTypeT
         }
     }
 
-    private void internalTestSettingValue() throws Exception
+    private void internalTestSettingValue() throws IllegalArgumentException, 
IllegalAccessException
     {
         if (cardinality != Cardinality.Simple)
         {
@@ -135,12 +135,12 @@ class SchemaTester extends AbstractTypeT
         }
     }
 
-    public void testSettingValueInArray() throws Exception
+    public void testSettingValueInArray() throws IllegalArgumentException, 
IllegalAccessException
     {
         internalTestSettingValueInArray();
     }
 
-    public void testRandomSettingValueInArray() throws Exception
+    public void testRandomSettingValueInArray() throws 
IllegalArgumentException, IllegalAccessException
     {
         initializeSeed(new Random());
         for (int i=0; i < RAND_LOOP_COUNT;i++)
@@ -149,7 +149,7 @@ class SchemaTester extends AbstractTypeT
         }
     }
 
-    private void internalTestSettingValueInArray() throws Exception
+    private void internalTestSettingValueInArray() throws 
IllegalArgumentException, IllegalAccessException
     {
         if (cardinality == Cardinality.Simple)
         {
@@ -170,7 +170,7 @@ class SchemaTester extends AbstractTypeT
                 schema.addBagValue(property.getPropertyName(), property);
                 break;
             default:
-                throw new Exception("Unexpected case in test : " + 
cardinality.name());
+                throw new IllegalArgumentException("Unexpected case in test : 
" + cardinality.name());
         }
         String qn = getPropertyQualifiedName(fieldName);
         assertNotNull(schema.getProperty(fieldName));
@@ -187,12 +187,12 @@ class SchemaTester extends AbstractTypeT
         }
     }
 
-    public void testPropertySetterSimple() throws Exception
+    public void testPropertySetterSimple() throws ReflectiveOperationException
     {
         internalTestPropertySetterSimple();
     }
 
-    public void testRandomPropertySetterSimple() throws Exception
+    public void testRandomPropertySetterSimple() throws 
ReflectiveOperationException
     {
         initializeSeed(new Random());
         for (int i=0; i < RAND_LOOP_COUNT;i++)
@@ -201,7 +201,7 @@ class SchemaTester extends AbstractTypeT
         }
     }
 
-    private void internalTestPropertySetterSimple() throws Exception
+    private void internalTestPropertySetterSimple() throws 
IllegalAccessException, ReflectiveOperationException
     {
         if (cardinality != Cardinality.Simple)
         {
@@ -227,12 +227,12 @@ class SchemaTester extends AbstractTypeT
         assertEquals(asp, result);
     }
 
-    public void testPropertySetterInArray() throws Exception
+    public void testPropertySetterInArray() throws ReflectiveOperationException
     {
         internalTestPropertySetterInArray();
     }
 
-    public void testRandomPropertySetterInArray() throws Exception
+    public void testRandomPropertySetterInArray() throws 
IllegalAccessException, ReflectiveOperationException
     {
         initializeSeed(new Random());
         for (int i=0; i < RAND_LOOP_COUNT;i++)
@@ -241,7 +241,7 @@ class SchemaTester extends AbstractTypeT
         }
     }
 
-    private void internalTestPropertySetterInArray() throws Exception
+    private void internalTestPropertySetterInArray() throws 
IllegalAccessException, ReflectiveOperationException
     {
         if (cardinality == Cardinality.Simple)
         {

Modified: 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/type/TestDerivedType.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/type/TestDerivedType.java?rev=1925050&r1=1925049&r2=1925050&view=diff
==============================================================================
--- 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/type/TestDerivedType.java 
(original)
+++ 
pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/type/TestDerivedType.java 
Sat Apr 12 16:17:44 2025
@@ -75,7 +75,7 @@ class TestDerivedType
     }
 
     protected TextType instanciate(XMPMetadata metadata, String namespaceURI, 
String prefix, String propertyName,
-            Object value) throws Exception
+            Object value) throws ReflectiveOperationException
     {
         Object[] initargs = { metadata, namespaceURI, prefix, propertyName, 
value };
         return constructor.newInstance(initargs);
@@ -83,7 +83,7 @@ class TestDerivedType
 
     @ParameterizedTest
     @MethodSource("initializeParameters")
-    void test1(Class<? extends TextType> clz, String type) throws Exception
+    void test1(Class<? extends TextType> clz, String type) throws 
ReflectiveOperationException
     {
         constructor = clz.getDeclaredConstructor(XMPMetadata.class, 
String.class, String.class, String.class, Object.class);
         TextType element = instanciate(xmp, null, PREFIX, NAME, VALUE);


Reply via email to