Integrated: 8375011: OldJTable.java - NullPointerException when columnData is null

Anupam Dev adev at openjdk.org
Thu Jan 29 19:02:14 UTC 2026


On Wed, 14 Jan 2026 10:21:40 GMT, Anupam Dev <adev at openjdk.org> wrote:

> 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

This pull request has now been integrated.

Changeset: 9470aa31
Author:    Anupam Dev <adev at openjdk.org>
Committer: Phil Race <prr at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/9470aa31175b504fcef15a932825dbc9e0532234
Stats:     264 lines in 1 file changed: 0 ins; 264 del; 0 mod

8375011: OldJTable.java - NullPointerException when columnData is null

Reviewed-by: prr, psadhukhan, tr

-------------

PR: https://git.openjdk.org/jdk/pull/29226


More information about the client-libs-dev mailing list