On Mon, 22 May 2023 12:42:05 GMT, Alexey Ivanov <[email protected]> wrote:
>> Tejesh R has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Updated based on review comments
>
> 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.
> test/jdk/java/awt/ScrollPane/ScrollPaneWindowsTest.java line 85:
>
>> 83: System.out.println("Adjustment Vertical Scroll Event
>> called ");
>> 84: }
>> 85: });
>
> Suggestion:
>
> vScroll.addAdjustmentListener(ScrollPaneWindowsTest.this);
>
> Isn't it more concise without introducing any duplicate code?
Updated and tested.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13621#discussion_r1200540594
PR Review Comment: https://git.openjdk.org/jdk/pull/13621#discussion_r1200542415