<Swing Dev> Integrated: 5078989: Null Pointer exception in SpinnerListMode
Prasanta Sadhukhan
psadhukhan at openjdk.java.net
Fri Oct 2 08:13:41 UTC 2020
On Wed, 30 Sep 2020 06:58:17 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
> Please review a fix for an issue where it is seen that when the data in SpinnerListModel has a null value, pressing any
> key after deleting the current value throws null pointer exception. This is because findNextMatch() calls list.get but
> dont check for null value and tries to call toString() on the value resulting in NPE. The spec is not clear about
> SpinnerListModel having null values in List so user can have null values in List passed to SpinnerListModel constructor
> so we need to guard against it for NPE.
This pull request has now been integrated.
Changeset: 4185ed32
Author: Prasanta Sadhukhan <psadhukhan at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/4185ed32
Stats: 93 lines in 2 files changed: 90 ins; 0 del; 3 mod
5078989: Null Pointer exception in SpinnerListMode
Reviewed-by: serb
-------------
PR: https://git.openjdk.java.net/jdk/pull/423
More information about the swing-dev
mailing list