On Fri, 18 Oct 2024 22:36:33 GMT, Sergey Bylokhov wrote:
>> This test follows the same pattern that I used in
>> https://github.com/openjdk/jdk/pull/21474:
>>
>> https://github.com/openjdk/jdk/pull/21474/files#diff-2a8cee50408407d7e24de4cb85f0921cfc5db7c215d3b29cf101a4050323e9a9R92
>
>> To ensu
> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
> methods.
>
> I removed all the unused methods by extending `MouseAdapter`.
>
> I use `CountDownLatch` to synchronise actions in the test.
>
> The test still verifies `button.getModel().isArmed()` doesn't always return
>
On Fri, 18 Oct 2024 22:36:33 GMT, Sergey Bylokhov wrote:
>> This test follows the same pattern that I used in
>> https://github.com/openjdk/jdk/pull/21474:
>>
>> https://github.com/openjdk/jdk/pull/21474/files#diff-2a8cee50408407d7e24de4cb85f0921cfc5db7c215d3b29cf101a4050323e9a9R92
>
>> To ensu
On Mon, 21 Oct 2024 18:52:14 GMT, Alexey Ivanov wrote:
>> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
>> methods.
>>
>> I removed all the unused methods by extending `MouseAdapter`.
>>
>> I use `CountDownLatch` to synchronise actions in the test.
>>
>> The test stil
> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
> methods.
>
> I removed all the unused methods by extending `MouseAdapter`.
>
> I use `CountDownLatch` to synchronise actions in the test.
>
> The test still verifies `button.getModel().isArmed()` doesn't always return
>
On Mon, 21 Oct 2024 15:54:32 GMT, Abhishek Kumar wrote:
>> Alexey Ivanov has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Use JButton directly instead of TestButton subclass
>
> test/jdk/javax/swing/JButton/bug4323121.java line 50:
>
>>
> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
> methods.
>
> I removed all the unused methods by extending `MouseAdapter`.
>
> I use `CountDownLatch` to synchronise actions in the test.
>
> The test still verifies `button.getModel().isArmed()` doesn't always return
>
On Mon, 21 Oct 2024 18:39:07 GMT, Alexey Ivanov wrote:
>>> To ensure all the events in the queue are handled, I added
>>> `robot.waitForIdle()`.
>>
>> This will flush events which were posted after the windows gained focus, but
>> before the patch the test flushed all events (including event t
On Fri, 18 Oct 2024 22:36:33 GMT, Sergey Bylokhov wrote:
>> This test follows the same pattern that I used in
>> https://github.com/openjdk/jdk/pull/21474:
>>
>> https://github.com/openjdk/jdk/pull/21474/files#diff-2a8cee50408407d7e24de4cb85f0921cfc5db7c215d3b29cf101a4050323e9a9R92
>
>> To ensu
On Mon, 21 Oct 2024 15:12:50 GMT, Alexey Ivanov wrote:
>> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
>> methods.
>>
>> I removed all the unused methods by extending `MouseAdapter`.
>>
>> I use `CountDownLatch` to synchronise actions in the test.
>>
>> The test stil
> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
> methods.
>
> I removed all the unused methods by extending `MouseAdapter`.
>
> I use `CountDownLatch` to synchronise actions in the test.
>
> The test still verifies `button.getModel().isArmed()` doesn't always return
>
On Fri, 18 Oct 2024 19:16:54 GMT, Harshitha Onkar wrote:
>> Alexey Ivanov has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Remove space before comma
>>
>> Co-authored-by: Abhishek Kumar
>
> test/jdk/javax/swing/JButton/bug4323121.ja
On Fri, 18 Oct 2024 19:16:14 GMT, Harshitha Onkar wrote:
>> Alexey Ivanov has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Remove space before comma
>>
>> Co-authored-by: Abhishek Kumar
>
> test/jdk/javax/swing/JButton/bug4323121.ja
On Fri, 18 Oct 2024 17:41:51 GMT, Alexey Ivanov wrote:
>> I reversed the order because window may gain focus before all the events are
>> processed.
>>
>> To ensure all the events in the queue are handled, I added
>> `robot.waitForIdle()`.
>>
>> The next action in the test is to get location
On Fri, 18 Oct 2024 16:48:21 GMT, Alexey Ivanov wrote:
>> test/jdk/javax/swing/JButton/bug4323121.java line 66:
>>
>>> 64: });
>>> 65: robot.waitForIdle();
>>> 66: robot.delay(1000);
>>
>> The new code probably should follow the same pattern, flush all
>> ev
On Fri, 18 Oct 2024 12:19:24 GMT, Alexey Ivanov wrote:
>> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
>> methods.
>>
>> I removed all the unused methods by extending `MouseAdapter`.
>>
>> I use `CountDownLatch` to synchronise actions in the test.
>>
>> The test stil
On Fri, 18 Oct 2024 16:36:59 GMT, Sergey Bylokhov wrote:
>> Alexey Ivanov has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Remove space before comma
>>
>> Co-authored-by: Abhishek Kumar
>
> test/jdk/javax/swing/JButton/bug4323121.ja
On Fri, 18 Oct 2024 12:19:24 GMT, Alexey Ivanov wrote:
>> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
>> methods.
>>
>> I removed all the unused methods by extending `MouseAdapter`.
>>
>> I use `CountDownLatch` to synchronise actions in the test.
>>
>> The test stil
On Fri, 18 Oct 2024 12:12:48 GMT, Alexey Ivanov wrote:
>> test/jdk/javax/swing/JButton/bug4323121.java line 59:
>>
>>> 57:
>>> 58: // Usage of this flag is thread-safe because of using the
>>> mouseEntered latch
>>> 59: private static boolean modelArmed;
>>
>> should it be volatile?
>
On Fri, 18 Oct 2024 12:19:24 GMT, Alexey Ivanov wrote:
>> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
>> methods.
>>
>> I removed all the unused methods by extending `MouseAdapter`.
>>
>> I use `CountDownLatch` to synchronise actions in the test.
>>
>> The test stil
> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
> methods.
>
> I removed all the unused methods by extending `MouseAdapter`.
>
> I use `CountDownLatch` to synchronise actions in the test.
>
> The test still verifies `button.getModel().isArmed()` doesn't always return
>
On Fri, 18 Oct 2024 12:02:49 GMT, Abhishek Kumar wrote:
>> Alexey Ivanov has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - Amend indentation in the finally block
>> - Inline mouseEntered listener for the button
>
> test/jdk/javax/swing/
On Fri, 18 Oct 2024 11:39:40 GMT, Alexey Ivanov wrote:
>> Both approaches sounds okay to me, but adding an anonymous class similar to
>> WindowAdapter() may be clearer.
>
> Since you both for inlining the listener, I've amended the code.
Looks clearer now.
-
PR Review Comment: htt
On Fri, 18 Oct 2024 11:44:19 GMT, Alexey Ivanov wrote:
>> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
>> methods.
>>
>> I removed all the unused methods by extending `MouseAdapter`.
>>
>> I use `CountDownLatch` to synchronise actions in the test.
>>
>> The test stil
> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
> methods.
>
> I removed all the unused methods by extending `MouseAdapter`.
>
> I use `CountDownLatch` to synchronise actions in the test.
>
> The test still verifies `button.getModel().isArmed()` doesn't always return
>
On Tue, 15 Oct 2024 01:00:02 GMT, Harshitha Onkar wrote:
>> If anyone else thinks using an anonymous class here makes the code shorter
>> and cleaner, I'll go for it.
>
> Both approaches sounds okay to me, but adding an anonymous class similar to
> WindowAdapter() may be clearer.
Since you bot
On Mon, 14 Oct 2024 15:34:29 GMT, Alexey Ivanov wrote:
>> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
>> methods.
>>
>> I removed all the unused methods by extending `MouseAdapter`.
>>
>> I use `CountDownLatch` to synchronise actions in the test.
>>
>> The test stil
On Mon, 14 Oct 2024 15:34:29 GMT, Alexey Ivanov wrote:
>> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
>> methods.
>>
>> I removed all the unused methods by extending `MouseAdapter`.
>>
>> I use `CountDownLatch` to synchronise actions in the test.
>>
>> The test stil
On Mon, 14 Oct 2024 15:34:29 GMT, Alexey Ivanov wrote:
>> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
>> methods.
>>
>> I removed all the unused methods by extending `MouseAdapter`.
>>
>> I use `CountDownLatch` to synchronise actions in the test.
>>
>> The test stil
On Mon, 14 Oct 2024 15:59:26 GMT, Alexey Ivanov wrote:
>> Ok...
>
> If anyone else thinks using an anonymous class here makes the code shorter
> and cleaner, I'll go for it.
Both approaches sounds okay to me, but adding an anonymous class similar to
WindowAdapter() may be clearer.
---
On Mon, 14 Oct 2024 15:55:34 GMT, Abhishek Kumar wrote:
>> I removed the unneeded listener and inlined creation of the event handler.
>>
>> Thus, I kept the current structure of test code. I prefer it this way for
>> consistency with `JButton/bug4490179.java` in
>> https://github.com/openjdk/j
On Mon, 14 Oct 2024 15:35:47 GMT, Alexey Ivanov wrote:
>> Yeah, this is an option. As I mentioned earlier that MouseMotionListener is
>> not needed, so creating an eventHandler object may not be of great use. I
>> agree if more than one listener needs to be added, creating an eventHandler
>> o
On Mon, 14 Oct 2024 15:16:01 GMT, Abhishek Kumar wrote:
>> Why?
>>
>> This comment is meant for the `modelArmed` flag. The way it's used now is
>> thread-safe because of using `mouseEntered`, specifically a value is written
>> to the flag before `mouseEntered.countDown()` is called, and its va
> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
> methods.
>
> I removed all the unused methods by extending `MouseAdapter`.
>
> I use `CountDownLatch` to synchronise actions in the test.
>
> The test still verifies `button.getModel().isArmed()` doesn't always return
>
On Mon, 14 Oct 2024 15:00:17 GMT, Alexey Ivanov wrote:
>> test/jdk/javax/swing/JButton/bug4323121.java line 69:
>>
>>> 67: SwingUtilities.invokeAndWait(() -> {
>>> 68: button = new TestButton("gotcha");
>>> 69: button.addMouseMotionListener(eventHandle
On Mon, 14 Oct 2024 13:59:58 GMT, Alexey Ivanov wrote:
>> test/jdk/javax/swing/JButton/bug4323121.java line 58:
>>
>>> 56: private static final CountDownLatch mouseEntered = new
>>> CountDownLatch(1);
>>> 57:
>>> 58: // Thread-safe by using the mouseEntered latch
>>
>> Comment may be
On Mon, 14 Oct 2024 06:33:52 GMT, Abhishek Kumar wrote:
>> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
>> methods.
>>
>> I removed all the unused methods by extending `MouseAdapter`.
>>
>> I use `CountDownLatch` to synchronise actions in the test.
>>
>> The test sti
On Fri, 11 Oct 2024 18:20:52 GMT, Alexey Ivanov wrote:
> The test `javax/swing/JButton/bug4323121.java` contains lots of unused
> methods.
>
> I removed all the unused methods by extending `MouseAdapter`.
>
> I use `CountDownLatch` to synchronise actions in the test.
>
> The test still verifi
38 matches
Mail list logo