Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5078989: Null Pointer exception in SpinnerListMode #423

Closed
wants to merge 2 commits into from

Conversation

@prsadhuk
Copy link
Contributor

@prsadhuk prsadhuk commented Sep 30, 2020

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.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-5078989: Null Pointer exception in SpinnerListMode

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/423/head:pull/423
$ git checkout pull/423

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Sep 30, 2020

👋 Welcome back psadhukhan! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

Loading

@openjdk openjdk bot added the rfr label Sep 30, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Sep 30, 2020

@prsadhuk The following label will be automatically applied to this pull request:

  • swing

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

Loading

@openjdk openjdk bot added the swing label Sep 30, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Sep 30, 2020

Webrevs

Loading

mrserb
mrserb approved these changes Oct 1, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Oct 1, 2020

@prsadhuk This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for more details.

After integration, the commit message for the final commit will be:

5078989: Null Pointer exception in SpinnerListMode

Reviewed-by: serb

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 105 new commits pushed to the master branch:

  • 3c4e824: 8249783: Simplify DerValue and DerInputStream
  • 9230c2a: 8253747: tools/jpackage/share/AppImagePackageTest.java fails with InstalledPackageSize: 0
  • cfd41c0: 8232840: java/math/BigInteger/largeMemory/SymmetricRangeTests.java fails due to "OutOfMemoryError: Requested array size exceeds VM limit"
  • 8fda5b8: 8253904: Revert Tokenizer improvements JDK-8224225
  • 60ec2a5: 8253824: Revert JDK-8253089 since VS warning C4307 has been disabled
  • 90c131f: 8224225: Tokenizer improvements
  • 9670425: 8253822: Remove unused exception_address_is_unpack_entry
  • 8440279: 8180514: TestPrintMdo.java test fails with -XX:-TieredCompilation
  • 44e6820: 8253650: Cleanup: remove alignment_hint parameter from os::reserve_memory
  • ed62b01: 6646602: Spelling error in javadoc for javax.swing.tree.TreeModel
  • ... and 95 more: https://git.openjdk.java.net/jdk/compare/dcde95ba0d68a3aa3f2f405c6141d645a52c28e4...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

Loading

@openjdk openjdk bot added the ready label Oct 1, 2020
@prsadhuk
Copy link
Contributor Author

@prsadhuk prsadhuk commented Oct 2, 2020

/integrate

Loading

@openjdk openjdk bot closed this Oct 2, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels Oct 2, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Oct 2, 2020

@prsadhuk Since your change was applied there have been 107 commits pushed to the master branch:

  • 6f40a41: 8253891: Debug x86_32 builds fail after JDK-8239090
  • b9505df: 8253118: Avoid unnecessary deopts when OSR nmethods of the same level are present.
  • 3c4e824: 8249783: Simplify DerValue and DerInputStream
  • 9230c2a: 8253747: tools/jpackage/share/AppImagePackageTest.java fails with InstalledPackageSize: 0
  • cfd41c0: 8232840: java/math/BigInteger/largeMemory/SymmetricRangeTests.java fails due to "OutOfMemoryError: Requested array size exceeds VM limit"
  • 8fda5b8: 8253904: Revert Tokenizer improvements JDK-8224225
  • 60ec2a5: 8253824: Revert JDK-8253089 since VS warning C4307 has been disabled
  • 90c131f: 8224225: Tokenizer improvements
  • 9670425: 8253822: Remove unused exception_address_is_unpack_entry
  • 8440279: 8180514: TestPrintMdo.java test fails with -XX:-TieredCompilation
  • ... and 97 more: https://git.openjdk.java.net/jdk/compare/dcde95ba0d68a3aa3f2f405c6141d645a52c28e4...master

Your commit was automatically rebased without conflicts.

Pushed as commit 4185ed3.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Loading

@prsadhuk prsadhuk deleted the JDK-5078989 branch Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants