On Fri, 10 Dec 2021 17:03:49 GMT, Liam Miller-Cushon <cus...@openjdk.org> wrote:

>> This change updates the serialized objects used by 
>> `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a 
>> similar approach to the previous fix in 
>> [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082).
>
> Liam Miller-Cushon has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Add a few more missing calls to LookAndFeel.uninstallColors

> > To be clear, I think the proposed change is good on its own: it adds 
> > convenience methods to clean up UI properties when a L&F is uninstalled, it 
> > adds the clean-up where it was missing. But it doesn't fit into the fix of 
> > this test failure. This work should be an enhancement performed under 
> > another bugid.
>
> Better to start afresh with a new bug with an appropriate synopsis and then 
> write some new tests that verify the UI is uninstalled on all the Swing 
> components as you cycle though available L&Fs per-platform.

I have filed https://bugs.openjdk.java.net/browse/JDK-8278620 to track adding 
test coverage for the `uninstallUI` methods and deciding on the best fix for 
that issue.

> Taking into account the above comments, this test could be simplified to 
> write out the objects and then read them in. No persistent serialization 
> which is explicitly unsupported.
>
>  I think we should scrap the test or find a different way to do whatever it 
> intends to verify.

Currently the test relies on making a manual change to `DragGestureEvent` and 
`DragGestureRecognize` before serializing the objects, so it's not clear to me 
how the test would be modified to do that at test-time: 
https://github.com/openjdk/jdk/blob/5a4a9bb9d55134deac0e02cf37f31d1dd2223024/test/jdk/java/awt/dnd/BadSerializationTest/BadSerializationTest.java#L95-L96

I'm happy to update this change to scrap the test if there's agreement that's 
the best resolution.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6603

Reply via email to