RFR: 8375011: OldJTable.java - NullPointerException when columnData is null [v2]
ANUPAM DEV
duke at openjdk.org
Wed Jan 14 10:40:57 UTC 2026
> Hi,
>
> This is a fix for NPE in OldJTable.addColumn
>
> The addColumn method in OldJTable.java was unconditionally calling columnData.toArray(), which caused a NullPointerException when columnData was null (e.g., when called from addColumn(Object, int)).
>
> This commit adds a null check to safe-guard against this NPE, passing null to the underlying DefaultTableModel when columnData is missing.
>
> Kindly review.
>
> Regards,
> Anupam
ANUPAM DEV has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
Modified code for null check
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/29226/files
- new: https://git.openjdk.org/jdk/pull/29226/files/24fa42b2..b62c23b1
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=29226&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=29226&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/29226.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29226/head:pull/29226
PR: https://git.openjdk.org/jdk/pull/29226
More information about the client-libs-dev
mailing list