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/12/05 20:33:29 UTC

svn commit: r1870891 - /pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java

Author: tilman
Date: Thu Dec  5 20:33:29 2019
New Revision: 1870891

URL: http://svn.apache.org/viewvc?rev=1870891&view=rev
Log:
PDFBOX-4071: remove unneeded catch

Modified:
    pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java

Modified: pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java?rev=1870891&r1=1870890&r2=1870891&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java Thu Dec  5 20:33:29 2019
@@ -325,15 +325,7 @@ public final class PDImageXObject extend
      */
     public static PDImageXObject createFromByteArray(PDDocument document, byte[] byteArray, String name) throws IOException
     {
-        FileType fileType;
-        try
-        {
-            fileType = FileTypeDetector.detectFileType(byteArray);
-        }
-        catch (IOException e)
-        {
-            throw new IOException("Could not determine file type: " + name, e);
-        }
+        FileType fileType = FileTypeDetector.detectFileType(byteArray);
         if (fileType == null)
         {
             throw new IllegalArgumentException("Image type not supported: " + name);