> 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.
Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Use ternary operator ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/4969/files - new: https://git.openjdk.java.net/jdk/pull/4969/files/5b181bee..fffb3f32 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4969&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4969&range=00-01 Stats: 4 lines in 1 file changed: 0 ins; 3 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/4969.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4969/head:pull/4969 PR: https://git.openjdk.java.net/jdk/pull/4969