<Swing Dev> [11] Review Request: JDK-6257207 : JTable.getDefaultEditor throws undocumented NullPointerException

Pankaj Bansal pankaj.b.bansal at oracle.com
Fri Jan 5 12:16:03 UTC 2018


Hi All,

 

Please review the fix for JDK 11.

 

Bug:

https://bugs.openjdk.java.net/browse/JDK-6257207

 

Webrev:

http://cr.openjdk.java.net/~pbansal/6257207/webrev.00/

 

Issue:

JTable.getDefaultEditor can throw a NullPointerException.

 

Fix:

While creating JTable, when data model is set by calling SetModel function, SetModel function throws TableChanged event. Now if client code has subclassed the JTable and is listening to TableChanged events, client can try to use DefaultEditor, which causes problem as it has not been initialized as of now. Moved the call to initializeLocalVars above setModel call. 

 

Regards,

Pankaj Bansal

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20180105/6d609d67/attachment.html>


More information about the swing-dev mailing list