From 528eb546e428d41efde2815eea85a1b70b880a88 Mon Sep 17 00:00:00 2001 From: Tilman Hausherr Date: Mon, 14 Aug 2023 06:51:54 +0000 Subject: [PATCH] PDFBOX-5653: avoid extreme phase start values that freeze jdk8 git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1911639 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/pdfbox/rendering/PageDrawer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java index 6d747c72663..636312a2758 100644 --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java @@ -728,7 +728,7 @@ private Stroke getStroke() LOG.warn("Miter limit must be >= 1, value " + miterLimit + " is ignored"); miterLimit = 10; } - phaseStart = Math.max(phaseStart, Short.MAX_VALUE); // PDFBOX-5653 + phaseStart = Math.min(phaseStart, Short.MAX_VALUE); // PDFBOX-5653: avoid jdk8 JVM freeze return new BasicStroke(lineWidth, lineCap, lineJoin, miterLimit, dashArray, phaseStart); }