Hello. I've found confusing placement of `null` check in the fix for JDK-8235961 Method 'com.sun.rowset.CachedRowSetImpl#getColIdxByName'
private int getColIdxByName(String name) throws SQLException { RowSetMD = (RowSetMetaDataImpl)this.getMetaData(); int cols = RowSetMD.getColumnCount(); if (RowSetMD != null) { for (int i = 1; i <= cols; ++i) { String colName = RowSetMD.getColumnName(i); if (colName != null) if (name.equalsIgnoreCase(colName)) return (i); else continue; } } throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.invalcolnm").toString()); } As you can see, field 'RowSetMD' is checked for 'null' _after_ dereferencing. I think proper code should look like this: private int getColIdxByName(String name) throws SQLException { RowSetMD = (RowSetMetaDataImpl)this.getMetaData(); if (RowSetMD != null) { int cols = RowSetMD.getColumnCount(); for (int i = 1; i <= cols; ++i) { ... Andrey Turbanov