RFR: 8335637: Add explicit non-null return value expectations to Object.toString() [v4]
Raffaello Giulietti
rgiulietti at openjdk.org
Wed Jul 10 08:18:16 UTC 2024
On Wed, 10 Jul 2024 05:02:36 GMT, Joe Darcy <darcy at openjdk.org> wrote:
>> Make well-behaved implementation expectations of Object.{toString, hashCode} explicit.
>
> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
>
> Narrow scope of the change.
It's not only cyclic data that are problematic.
It's quite easy to build a DAG (so no cycles) with just 50 `record`s that takes days to return `hashCode()` and that throws OOME on `toString()`.
Whatever the future wording will be about resource consumption (time and space), it will be hard to get it right while still being reasonable.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20063#issuecomment-2219847401
More information about the core-libs-dev
mailing list