Author: tilman
Date: Mon Jan  8 04:25:52 2024
New Revision: 1915125

URL: http://svn.apache.org/viewvc?rev=1915125&view=rev
Log:
PDFBOX-5749: also catch IllegalArgumentException that occurs with jdk20

Modified:
    
pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java

Modified: 
pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
URL: 
http://svn.apache.org/viewvc/pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java?rev=1915125&r1=1915124&r2=1915125&view=diff
==============================================================================
--- 
pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
 (original)
+++ 
pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
 Mon Jan  8 04:25:52 2024
@@ -1337,7 +1337,7 @@ public class PageDrawer extends PDFGraph
                     {
                         graphics.drawImage(image, imageTransform, null);
                     }
-                    catch (NegativeArraySizeException e)
+                    catch (NegativeArraySizeException | 
IllegalArgumentException e)
                     {
                         // PDFBOX-5749 / JDK-8314112 catch WPathGraphics bug
                         LOG.debug(e.getMessage(), e);
@@ -1355,7 +1355,7 @@ public class PageDrawer extends PDFGraph
                 {
                     graphics.drawImage(imageToDraw, imageTransform, null);
                 }
-                catch (NegativeArraySizeException e)
+                catch (NegativeArraySizeException | IllegalArgumentException e)
                 {
                     // PDFBOX-5749 / JDK-8314112 catch WPathGraphics bug
                     LOG.debug(e.getMessage(), e);
@@ -1391,7 +1391,7 @@ public class PageDrawer extends PDFGraph
                 {
                     graphics.drawImage(image, imageTransform, null);
                 }
-                catch (NegativeArraySizeException e)
+                catch (NegativeArraySizeException | IllegalArgumentException e)
                 {
                     // PDFBOX-5749 / JDK-8314112 catch WPathGraphics bug
                     LOG.debug(e.getMessage(), e);


Reply via email to