On Mon, 22 May 2023 13:44:59 GMT, Tejesh R <t...@openjdk.org> wrote: >> test/jdk/java/awt/ScrollPane/ScrollPaneLimitation.java line 115: >> >>> 113: Container cp = child.getParent(); >>> 114: p = cp.getLocation(); >>> 115: if (p.y != -SCROLL_POS) { >> >> Suggestion: >> >> p = cp.getLocation(); >> System.out.println("Child's parent pos = " + p); >> if (p.y != -SCROLL_POS) { >> >> Just to make it clear that this branch is taken. Otherwise the test ends >> with the message: >> >> Child pos = java.awt.Point[x=0,y=0] >> >> which is confusing. Yet no exception is thrown. > > Child location is expected to be 0,0 as explained in the test, whereas > parents position is -500, hence no exception is thrown.
Yes, this is adding the suggested print will resolve all the confusion because you will see: ... Scroll pos = java.awt.Point[x=0,y=50000] Child pos = java.awt.Point[x=0,y=0] Child's parent pos = java.awt.Point[x=0,y=-50000] Isn't it clearer? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13621#discussion_r1200559746