RFR: 6257207: JTable.getDefaultEditor throws NullPointerException [v6]

Prasanta Sadhukhan psadhukhan at openjdk.org
Tue Nov 22 14:31:04 UTC 2022


On Thu, 17 Nov 2022 18:10:38 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix
>
> src/java.desktop/share/classes/javax/swing/JTable.java line 706:
> 
>> 704:         setModel(dm);
>> 705: 
>> 706:         initializeLocalVars();
> 
> Did we check that the NPE now can be occurred in the initializeLocalVars since the model at that point is null? For example the initializeLocalVars->setTableHeader->firePropertyChange("tableHeader"....)->in the listener the model will be null, while it was non null before the fix.

Fix is updated to initialize the required local vars which are not initialized before use.

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

PR: https://git.openjdk.org/jdk/pull/10871



More information about the client-libs-dev mailing list