diff --git a/test/jdk/javax/swing/JSplitPane/4885629/bug4885629.java b/test/jdk/javax/swing/JSplitPane/4885629/bug4885629.java index c7e980081cf..fa6c1f21063 100644 --- a/test/jdk/javax/swing/JSplitPane/4885629/bug4885629.java +++ b/test/jdk/javax/swing/JSplitPane/4885629/bug4885629.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -104,9 +104,9 @@ public void run() { SwingUtilities.convertPointToScreen(p, sp); - for (int i = 0; i < rect.width; i++) { + for (int i = 1; i < rect.width - 1; i++) { if (!BGCOLOR.equals(robot.getPixelColor(p.x + i, p.y + rect.height - 1))) { - throw new Error("The divider's area has incorrect color."); + throw new Error("The divider's area has incorrect color. i=" + i); } } }