jdk icon indicating copy to clipboard operation
jdk copied to clipboard

8292955: Collections.checkedMap Map.merge does not properly check key and value

Open Korov opened this issue 11 months ago • 15 comments

When the specified key did not associated with a value, should check the key and value type.


Progress

  • [x] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue

Issue

  • JDK-8292955: Collections.checkedMap Map.merge does not properly check key and value (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18141/head:pull/18141
$ git checkout pull/18141

Update a local copy of the PR:
$ git checkout pull/18141
$ git pull https://git.openjdk.org/jdk.git pull/18141/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18141

View PR using the GUI difftool:
$ git pr show -t 18141

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18141.diff

Webrev

Link to Webrev Comment

Korov avatar Mar 06 '24 18:03 Korov

:wave: Welcome back Korov! 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.

bridgekeeper[bot] avatar Mar 06 '24 18:03 bridgekeeper[bot]

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

  • core-libs

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.

openjdk[bot] avatar Mar 06 '24 18:03 openjdk[bot]

Webrevs

mlbridge[bot] avatar Mar 06 '24 18:03 mlbridge[bot]

Good caught. A trivial suggestion.

Thanks for your suggestion, the code has been modified.

Korov avatar Mar 07 '24 04:03 Korov

@Korov 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 details.

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

8292955: Collections.checkedMap Map.merge does not properly check key and value

Reviewed-by: gli, liach, pminborg

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 1106 new commits pushed to the master branch:

  • 86eb5d9f3be30ff9df1318f18ab73c7129c978f6: 8329958: Windows x86 build fails: downcallLinker.cpp(36) redefinition
  • be1d374bc54d43aae3b3c1feace22d38fe2156b6: 8332825: ubsan: guardedMemory.cpp:35:11: runtime error: null pointer passed as argument 2, which is declared to never be null
  • ed81a478e175631f1de69eb4b43f927629fefd74: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic
  • 08face8c4cd2d0b6f48f99bae5a380b7f7e4f2c2: 8332890: Module imports don't work inside the same module
  • 793fd72fa66b1367b68fe798230ea61ea0aab1d8: 8332956: Problem list CodeCacheFullCountTest.java until JDK-8332954 is fixed
  • 891d5aedf12e837c9a9c7cb800fb3affa7430f00: 8332683: G1: G1CardSetArray::EntryDataType [2] triggers ubsan runtime errors
  • f3d6fbf52eac44734695935f73c5cfc0fb9ba167: 8330847: G1 accesses uninitialized memory when predicting eden copy time
  • 1b8dea4a9288c1518dc501a58d806c7365ea68b3: 8332894: ubsan: vmError.cpp:2090:26: runtime error: division by zero
  • 0e7ea390bb523888533265394a642071aba0c0c1: 8332678: Serial: Remove use of should_clear_all_soft_refs in serial folder
  • 72fbfe18cb20274bab2057f3d67920e0c86c5793: 8330577: G1 sometimes sends jdk.G1HeapRegionTypeChange for non-changes
  • ... and 1096 more: https://git.openjdk.org/jdk/compare/ae5e3fdd5922a232c9b48fc846c4fcdc8f2b2645...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@lgxbslgx, @minborg) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

openjdk[bot] avatar Mar 13 '24 20:03 openjdk[bot]

Hi @liach , Can you review my newly submitted code?

Korov avatar Mar 14 '24 05:03 Korov

@Korov This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Apr 11 '24 06:04 bridgekeeper[bot]

Keep-alive, maybe people like @viktorklang-ora might look at this simple fix too

liach avatar Apr 11 '24 14:04 liach

@liach I'm not a Reviewer (yet) so I'll defer to someone like @stuart-marks :)

viktorklang-ora avatar Apr 12 '24 08:04 viktorklang-ora

@Korov This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar May 10 '24 10:05 bridgekeeper[bot]

Hi @stuart-marks , Can you take a moment to review my PR? thank you very much for your help!

Korov avatar May 13 '24 06:05 Korov

/integrate

Korov avatar May 13 '24 15:05 Korov

@Korov Your change (at version 9898010662bfdd5483000094db874846d8802040) is now ready to be sponsored by a Committer.

openjdk[bot] avatar May 13 '24 15:05 openjdk[bot]

@viktorklang-ora Can you just leave an approval as a collections engineer to ensure this patch isn't "accidentally integrated"?

/reviewers 2 committer

liach avatar May 13 '24 17:05 liach

@liach Only the author of the pull request or Reviewers are allowed to change the number of required reviewers.

openjdk[bot] avatar May 13 '24 17:05 openjdk[bot]

@minborg Is it possible for you to review this collection bugfix?

liach avatar May 27 '24 12:05 liach

@minborg Is it possible for you to review this collection bugfix?

Will do! Thanks for the heads up.

minborg avatar May 28 '24 06:05 minborg

:warning: @Korov the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:

$ git checkout JDK-8292955
$ git commit --author='Preferred Full Name <[email protected]>' --allow-empty -m 'Update full name'
$ git push

openjdk[bot] avatar May 28 '24 06:05 openjdk[bot]

/sponsor

minborg avatar May 28 '24 06:05 minborg

Going to push as commit b5e1615c0084538f2161fe9b56748d188983e972. Since your change was applied there have been 1106 commits pushed to the master branch:

  • 86eb5d9f3be30ff9df1318f18ab73c7129c978f6: 8329958: Windows x86 build fails: downcallLinker.cpp(36) redefinition
  • be1d374bc54d43aae3b3c1feace22d38fe2156b6: 8332825: ubsan: guardedMemory.cpp:35:11: runtime error: null pointer passed as argument 2, which is declared to never be null
  • ed81a478e175631f1de69eb4b43f927629fefd74: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic
  • 08face8c4cd2d0b6f48f99bae5a380b7f7e4f2c2: 8332890: Module imports don't work inside the same module
  • 793fd72fa66b1367b68fe798230ea61ea0aab1d8: 8332956: Problem list CodeCacheFullCountTest.java until JDK-8332954 is fixed
  • 891d5aedf12e837c9a9c7cb800fb3affa7430f00: 8332683: G1: G1CardSetArray::EntryDataType [2] triggers ubsan runtime errors
  • f3d6fbf52eac44734695935f73c5cfc0fb9ba167: 8330847: G1 accesses uninitialized memory when predicting eden copy time
  • 1b8dea4a9288c1518dc501a58d806c7365ea68b3: 8332894: ubsan: vmError.cpp:2090:26: runtime error: division by zero
  • 0e7ea390bb523888533265394a642071aba0c0c1: 8332678: Serial: Remove use of should_clear_all_soft_refs in serial folder
  • 72fbfe18cb20274bab2057f3d67920e0c86c5793: 8330577: G1 sometimes sends jdk.G1HeapRegionTypeChange for non-changes
  • ... and 1096 more: https://git.openjdk.org/jdk/compare/ae5e3fdd5922a232c9b48fc846c4fcdc8f2b2645...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar May 28 '24 06:05 openjdk[bot]

@minborg @Korov Pushed as commit b5e1615c0084538f2161fe9b56748d188983e972.

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

openjdk[bot] avatar May 28 '24 06:05 openjdk[bot]