On Tue, 3 Aug 2021 08:23:19 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

> In the JTable demo, if we double click on the first cell in the Favorite 
> Number column, delete the value and click on some
> other cell, a java.lang.NullPointerException is getting thrown.
> The flaw is in the TableDemo's TableModel getColumnClass() method which 
> queries the value of cell 0 in the target column, and returns its Class. This 
> logic seems to be flawed - an NPE will be thrown when the value in cell 0 is 
> null.
> Fix by checking for null.

Verified that the NPE is not happening after the fix.

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

Marked as reviewed by pbansal (Reviewer).

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

Reply via email to