You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2019/08/20 16:39:18 UTC

svn commit: r1865554 - in /pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox: pdfparser/PDFParser.java pdmodel/PDDocument.java pdmodel/encryption/SecurityHandler.java pdmodel/encryption/StandardSecurityHandler.java

Author: tilman
Date: Tue Aug 20 16:39:17 2019
New Revision: 1865554

URL: http://svn.apache.org/viewvc?rev=1865554&view=rev
Log:
PDFBOX-4071: SonarQube peeve: remove declaration of thrown exception which is a subclass of another, but keep both in javadoc

Modified:
    pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java
    pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
    pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandler.java
    pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/StandardSecurityHandler.java

Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java?rev=1865554&r1=1865553&r2=1865554&view=diff
==============================================================================
--- pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java (original)
+++ pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java Tue Aug 20 16:39:17 2019
@@ -168,7 +168,7 @@ public class PDFParser extends COSParser
      * @throws InvalidPasswordException If the password is incorrect.
      * @throws IOException If something went wrong.
      */
-    protected void initialParse() throws InvalidPasswordException, IOException
+    protected void initialParse() throws IOException
     {
         COSDictionary trailer = retrieveTrailer();
     
@@ -209,7 +209,7 @@ public class PDFParser extends COSParser
      * @throws IOException If there is an error reading from the stream or corrupt data
      * is found.
      */
-    public void parse() throws InvalidPasswordException, IOException
+    public void parse() throws IOException
     {
          // set to false if all is processed
          boolean exceptionOccurred = true; 

Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java?rev=1865554&r1=1865553&r2=1865554&view=diff
==============================================================================
--- pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java (original)
+++ pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java Tue Aug 20 16:39:17 2019
@@ -969,7 +969,7 @@ public class PDDocument implements Close
      * @throws InvalidPasswordException If the file required a non-empty password.
      * @throws IOException in case of a file reading or parsing error
      */
-    public static PDDocument load(File file) throws InvalidPasswordException, IOException
+    public static PDDocument load(File file) throws IOException
     {
         return load(file, "", MemoryUsageSetting.setupMainMemoryOnly());
     }
@@ -986,7 +986,7 @@ public class PDDocument implements Close
      * @throws IOException in case of a file reading or parsing error
      */
     public static PDDocument load(File file, MemoryUsageSetting memUsageSetting)
-            throws InvalidPasswordException, IOException
+            throws IOException
     {
         return load(file, "", null, null, memUsageSetting);
     }
@@ -1003,7 +1003,7 @@ public class PDDocument implements Close
      * @throws IOException in case of a file reading or parsing error
      */
     public static PDDocument load(File file, String password)
-            throws InvalidPasswordException, IOException
+            throws IOException
     {
         return load(file, password, null, null, MemoryUsageSetting.setupMainMemoryOnly());
     }
@@ -1021,7 +1021,7 @@ public class PDDocument implements Close
      * @throws IOException in case of a file reading or parsing error
      */
     public static PDDocument load(File file, String password, MemoryUsageSetting memUsageSetting)
-            throws InvalidPasswordException, IOException
+            throws IOException
     {
         return load(file, password, null, null, memUsageSetting);
     }
@@ -1094,7 +1094,7 @@ public class PDDocument implements Close
      * @throws InvalidPasswordException If the PDF required a non-empty password.
      * @throws IOException In case of a reading or parsing error.
      */
-    public static PDDocument load(InputStream input) throws InvalidPasswordException, IOException
+    public static PDDocument load(InputStream input) throws IOException
     {
         return load(input, "", null, null, MemoryUsageSetting.setupMainMemoryOnly());
     }
@@ -1112,7 +1112,7 @@ public class PDDocument implements Close
      * @throws IOException In case of a reading or parsing error.
      */
     public static PDDocument load(InputStream input, MemoryUsageSetting memUsageSetting)
-            throws InvalidPasswordException, IOException
+            throws IOException
     {
         return load(input, "", null, null, memUsageSetting);
     }
@@ -1130,7 +1130,7 @@ public class PDDocument implements Close
      * @throws IOException In case of a reading or parsing error.
      */
     public static PDDocument load(InputStream input, String password)
-            throws InvalidPasswordException, IOException
+            throws IOException
     {
         return load(input, password, null, null, MemoryUsageSetting.setupMainMemoryOnly());
     }
@@ -1168,7 +1168,7 @@ public class PDDocument implements Close
      * @throws IOException In case of a reading or parsing error.
      */
     public static PDDocument load(InputStream input, String password, MemoryUsageSetting memUsageSetting)
-            throws InvalidPasswordException, IOException
+            throws IOException
     {
         return load(input, password, null, null, memUsageSetting);
     }
@@ -1216,7 +1216,7 @@ public class PDDocument implements Close
      * @throws InvalidPasswordException If the PDF required a non-empty password.
      * @throws IOException In case of a reading or parsing error.
      */
-    public static PDDocument load(byte[] input) throws InvalidPasswordException, IOException
+    public static PDDocument load(byte[] input) throws IOException
     {
         return load(input, "");
     }
@@ -1233,7 +1233,7 @@ public class PDDocument implements Close
      * @throws IOException In case of a reading or parsing error.
      */
     public static PDDocument load(byte[] input, String password)
-            throws InvalidPasswordException, IOException
+            throws IOException
     {
         return load(input, password, null, null);
     }

Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandler.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandler.java?rev=1865554&r1=1865553&r2=1865554&view=diff
==============================================================================
--- pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandler.java (original)
+++ pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandler.java Tue Aug 20 16:39:17 2019
@@ -130,7 +130,7 @@ public abstract class SecurityHandler
      * @throws IOException If there is an error accessing data.
      */
     public abstract void prepareForDecryption(PDEncryption encryption, COSArray documentIDArray,
-            DecryptionMaterial decryptionMaterial) throws InvalidPasswordException, IOException;
+            DecryptionMaterial decryptionMaterial) throws IOException;
 
     /**
      * Encrypt or decrypt a set of data.

Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/StandardSecurityHandler.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/StandardSecurityHandler.java?rev=1865554&r1=1865553&r2=1865554&view=diff
==============================================================================
--- pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/StandardSecurityHandler.java (original)
+++ pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/StandardSecurityHandler.java Tue Aug 20 16:39:17 2019
@@ -167,7 +167,7 @@ public final class StandardSecurityHandl
     @Override
     public void prepareForDecryption(PDEncryption encryption, COSArray documentIDArray,
                                      DecryptionMaterial decryptionMaterial)
-                                     throws InvalidPasswordException, IOException
+                                     throws IOException
     {
         if(!(decryptionMaterial instanceof StandardDecryptionMaterial))
         {