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); }