Author: tilman
Date: Mon Jan  8 04:25:59 2024
New Revision: 1915127

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

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

Modified: 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java?rev=1915127&r1=1915126&r2=1915127&view=diff
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java 
(original)
+++ 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java 
Mon Jan  8 04:25:59 2024
@@ -1336,7 +1336,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);
@@ -1354,7 +1354,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);
@@ -1390,7 +1390,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