Hi Mikhail,

Looks fine.

Shouldn't the test be put in its own directory?


Regards,
Alexey

On 17.05.2016 18:02, mikhail cherkasov wrote:
Hello all,

Could you please review a fix for:
https://bugs.openjdk.java.net/browse/JDK-6882559

webrev: http://cr.openjdk.java.net/~mcherkas/6882559/webrev.00/

The problem is that JTextPane during initialization saves
Thread.contextClassloader which is null, but class loader is a
null and Hashtable, which is used to store class loader, doesn't support a null value as result we get an exception. However JTextPane doesn't need to save
Thread.contextClassloader, it's optional:
http://hg.openjdk.java.net/jdk9/client/jdk/file/fb38b0925915/src/java.desktop/share/classes/javax/swing/JEditorPane.java#l1192
so it will work fine even if ClassLoader is null.
To fix the exception I wrapped a classloader into Optional before to put it into Hashtable.

Thanks,
Mikhail.

Reply via email to