RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v4]
Alexey Ivanov
aivanov at openjdk.java.net
Fri Jun 3 15:12:47 UTC 2022
On Thu, 2 Jun 2022 09:14:30 GMT, Tejesh R <tr at openjdk.org> wrote:
>> _Header_ object not initialized/set when paint() method of `WindowTableHeaderUI` class is executed. The paint() event is executed through explicit call of `JTable.updateUI()` in the regression test. In order to set the _header_ to the _called_ JTable, it is set in the `getTableCellRendererComponent()` method, which in turn makes the _header_ object available during paint event without causing NPE.
>
> Tejesh R has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 14 additional commits since the last revision:
>
> - Updated based on review comments
> - Merge branch 'master' of https://git.openjdk.java.net/jdk into branch_6429812
> - JTREG Tags updation
> - Removal of White space
> - Updated based on review comments and Added Test case TableRenderTest.java
> - header object set
> - Merge remote-tracking branch 'upstream/master' into branch_6429812
> - Merge remote-tracking branch 'upstream/master'
> - Merge branch 'master' of github.com:TejeshR13/jdk
> - Merge branch 'openjdk:master' into master
> - ... and 4 more: https://git.openjdk.java.net/jdk/compare/56ca5e28...98c2aab2
test/jdk/javax/swing/JTableHeader/TableRendererTest.java line 29:
> 27: @library /java/awt/regtesthelpers
> 28: @build PassFailJFrame
> 29: @summary Test to check if table is printed without NPE
Suggestion:
@summary Test to check if table is painted without NPE
-------------
PR: https://git.openjdk.java.net/jdk/pull/8830
More information about the client-libs-dev
mailing list