Hi,
Please review the fix for jdk9,
Bug: https://bugs.openjdk.java.net/browse/JDK-8020039
Webrev: http://cr.openjdk.java.net/~arapte/ajit/8020039/webrev.00/
Issue :
If null is passed as 'table' parameter to
SynthTableHeaderUI::getTableCellRendererComponent() method in
src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTableHeaderUI.java,
there is Null Pointer Exception.
Analysis :
This method already has a null check for 'table' parameter for second access
of this parameter in method.
Whereas the first access of the 'table' parameter lacks this check.
Fix :
Added null check for the first access of 'table' parameter in
SynthTableHeaderUI::getTableCellRendererComponent().
There is no else block added as the flow continues and passes table to base
class method using super. getTableCellRendererComponent().
The passed parameter is already checked in base class method correctly.
Hence, no change is needed in base class.
Test :
The fix is pretty straight forward.
Executed the code snippet given in the bug description. There is no NPE
after the fix.
Regards,
Ajit