Author: tilman Date: Mon Jan 8 09:11:43 2024 New Revision: 1915131 URL: http://svn.apache.org/viewvc?rev=1915131&view=rev Log: PDFBOX-5749: revert last two changes, the exception happens at a later time
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=1915131&r1=1915130&r2=1915131&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 09:11:43 2024 @@ -1333,15 +1333,7 @@ public class PageDrawer extends PDFGraph int h = Math.round(image.getHeight() * scaleY); if (w < 1 || h < 1) { - try - { - graphics.drawImage(image, imageTransform, null); - } - catch (NegativeArraySizeException | IllegalArgumentException e) - { - // PDFBOX-5749 / JDK-8314112 catch WPathGraphics bug - LOG.debug(e.getMessage(), e); - } + graphics.drawImage(image, imageTransform, null); return; } Image imageToDraw = image.getScaledInstance(w, h, Image.SCALE_SMOOTH); @@ -1351,15 +1343,7 @@ public class PageDrawer extends PDFGraph imageTransform.scale(1f / w * image.getWidth(), 1f / h * image.getHeight()); imageTransform.preConcatenate(originalTransform); graphics.setTransform(new AffineTransform()); - try - { - graphics.drawImage(imageToDraw, imageTransform, null); - } - catch (NegativeArraySizeException | IllegalArgumentException e) - { - // PDFBOX-5749 / JDK-8314112 catch WPathGraphics bug - LOG.debug(e.getMessage(), e); - } + graphics.drawImage(imageToDraw, imageTransform, null); graphics.setTransform(originalTransform); } else @@ -1387,15 +1371,7 @@ public class PageDrawer extends PDFGraph g.dispose(); image = bim; } - try - { - graphics.drawImage(image, imageTransform, null); - } - catch (NegativeArraySizeException | IllegalArgumentException e) - { - // PDFBOX-5749 / JDK-8314112 catch WPathGraphics bug - LOG.debug(e.getMessage(), e); - } + graphics.drawImage(image, imageTransform, null); } } }