8366446: Test java/awt/geom/ConcurrentDrawPolygonTest.java fails intermittently

Reviewed-by: jdv, aivanov, prr, rhalade
This commit is contained in:
Renjith Kannath Pariyangad 2025-09-10 11:56:45 +00:00 committed by bchristi
parent 05f8f5232f
commit 73af0a188a

View File

@ -1898,14 +1898,16 @@ public final class SunGraphics2D
protected void validateCompClip() {
int origClipState = clipState;
if (usrClip == null) {
final Shape clip = usrClip;
if (clip == null) {
clipState = CLIP_DEVICE;
clipRegion = devClip;
} else if (usrClip instanceof Rectangle2D clip) {
} else if (clip instanceof Rectangle2D rect2d) {
clipState = CLIP_RECTANGULAR;
clipRegion = devClip.getIntersection(clip);
clipRegion = devClip.getIntersection(rect2d);
} else {
PathIterator cpi = usrClip.getPathIterator(null);
PathIterator cpi = clip.getPathIterator(null);
int[] box = new int[4];
ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
try {