[jdk17u-dev] RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions

Roland Mesde duke at openjdk.org
Wed Nov 12 20:37:53 UTC 2025


Backporting JDK-8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions. Updates implementation to use a checked exception and adds a new test. Ran GHA Sanity Checks (passed), related ObjectInputStream tests (passed). Patch is clean.

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

Commit messages:
 - Backport 4116b109f004c9552db7448f2942a11d5dfe3cdc

Changes: https://git.openjdk.org/jdk17u-dev/pull/4174/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=4174&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8306461
  Stats: 155 lines in 3 files changed: 149 ins; 0 del; 6 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/4174.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/4174/head:pull/4174

PR: https://git.openjdk.org/jdk17u-dev/pull/4174


More information about the jdk-updates-dev mailing list