RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v9]

Liam Miller-Cushon cushon at openjdk.java.net
Wed Jan 12 18:14:46 UTC 2022


On Fri, 10 Dec 2021 17:03:49 GMT, Liam Miller-Cushon <cushon at 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

I have modified the test to create the serialized objects at test-time, instead of relying on checking in the serialized files.

> I wonder if it's possible to modify the value of the field using reflection via `setAccessible(true)`

Done: the test now creates valid objects, and then uses reflection to set the fields to `null` after the constructor has executed.

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

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



More information about the client-libs-dev mailing list