RFR: 8055461: getNextID in ImageIcon class can lead to overflow [v2]

Prasanta Sadhukhan psadhukhan at openjdk.org
Wed Jun 11 15:04:21 UTC 2025


> ImageIcon.getNextID uses `mediaTrackerID ` which do not detect overflow.
> 
> Theoretically there is a possibility that there can be overflow in the long time run or for large number of created "imageIcon"
> 
> Made sure there is no overflow and treat that loadImage as ABORTED
> 
> No regression testcase as it addresses theoretical possibility..

Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:

  Reset mediaTrackerID if it overflows

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/25666/files
  - new: https://git.openjdk.org/jdk/pull/25666/files/f79b4ca9..fd2ad261

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25666&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25666&range=00-01

  Stats: 13 lines in 1 file changed: 3 ins; 9 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/25666.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25666/head:pull/25666

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


More information about the client-libs-dev mailing list