[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-swing-dev
Subject:    <Swing Dev> RFR: 5078989: Null Pointer exception in SpinnerListMode
From:       Prasanta Sadhukhan <psadhukhan () openjdk ! java ! net>
Date:       2020-09-30 7:05:23
Message-ID: 5oxOnQZ2NLjLyYyzvr0FSnoIZPkV-usy-0-L8BuWFvQ=.6bf45bb3-536d-4942-a7a1-3ce548b92488 () github ! com
[Download RAW message or body]

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.

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

Commit messages:
 - Fix indent issue
 - 5078989: Null Pointer exception in SpinnerListMode

Changes: https://git.openjdk.java.net/jdk/pull/423/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=423&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-5078989
  Stats: 93 lines in 2 files changed: 90 ins; 0 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/423.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/423/head:pull/423

PR: https://git.openjdk.java.net/jdk/pull/423


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic