On Mon, 8 Jul 2024 20:32:52 GMT, Joe Darcy 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:
>
> Respond to review feedback.
Looks
On Mon, 8 Jul 2024 18:04:49 GMT, Alan Bateman wrote:
> Specifying that toString returns a non-null result is good. Specifying that
> the methods don't throw any exceptions, or an implSpec that the methods
> shouldn't throw is okay.
>
> I'm less sure about the proposed wording for resource usag
> 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:
Respond to review feedback.
-
Changes:
- all: https://git.openjdk.org/jdk/pull/20
On Mon, 8 Jul 2024 19:12:37 GMT, Joe Darcy wrote:
> PS There are cases where cyclic structures are not supported, such as in
> java.util.Set:
There are algorithms that also don't support that:
/**
* Returns a hash code based on the "deep contents" of the specified
* array. If th
On Mon, 8 Jul 2024 19:01:04 GMT, Joe Darcy wrote:
> One tricky part of the implementation was making sure the stack trace output
> did cycle detection since there were various ways exceptions could end up
> referring to each other.
Yes, the tricky part was to "Guard against malicious overrides
On Mon, 8 Jul 2024 19:11:43 GMT, Pavel Rappo wrote:
>>> While I understand and agree with the intent, we have several exceptions in
>>> the OpenJDK itself.
>>>
>>> Circular structures that throw `StackOverflowError` on `hashCode()` and
>>> huge numbers that take 20-30 min to compute `toString(
On Mon, 8 Jul 2024 17:04:07 GMT, Raffaello Giulietti
wrote:
> While I understand and agree with the intent, we have several exceptions in
> the OpenJDK itself.
>
> Circular structures that throw `StackOverflowError` on `hashCode()` and huge
> numbers that take 20-30 min to compute `toString()
On Mon, 8 Jul 2024 16:46:00 GMT, Joe Darcy 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:
>
> Update wording.
Specifying that t
On Mon, 8 Jul 2024 16:42:55 GMT, Joe Darcy wrote:
>> My understanding is the same. Personally, the wording reads unambiguously.
>> The words "circular" and "circularity" can be seen throughout codebase, in
>> similar contexts.
>>
>> FWIW, a simpler example can be constructed like this:
>>
>>
On Mon, 8 Jul 2024 09:55:27 GMT, Pavel Rappo wrote:
>> src/java.base/share/classes/java/lang/Object.java line 101:
>>
>>> 99: * implementation should not use excessive memory or time for its
>>> 100: * computations and should return a result for cyclic data
>>> 101: * structures.
> 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:
Update wording.
-
Changes:
- all: https://git.openjdk.org/jdk/pull/20063/files
On Mon, 8 Jul 2024 09:33:54 GMT, Jaikiran Pai wrote:
>> Make well-behaved implementation expectations of Object.{toString, hashCode}
>> explicit.
>
> src/java.base/share/classes/java/lang/Object.java line 101:
>
>> 99: * implementation should not use excessive memory or time for its
>> 100
On Sun, 7 Jul 2024 20:20:30 GMT, Joe Darcy wrote:
> Make well-behaved implementation expectations of Object.{toString, hashCode}
> explicit.
src/java.base/share/classes/java/lang/Object.java line 101:
> 99: * implementation should not use excessive memory or time for its
> 100: * com
On Sun, 7 Jul 2024 20:20:30 GMT, Joe Darcy wrote:
> Make well-behaved implementation expectations of Object.{toString, hashCode}
> explicit.
Looks good.
-
Marked as reviewed by prappo (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20063#pullrequestreview-2162781503
Make well-behaved implementation expectations of Object.{toString, hashCode}
explicit.
-
Commit messages:
- JDK-8335637: Add explicit well-behaved expectations to Object.{toString,
hashCode}
Changes: https://git.openjdk.org/jdk/pull/20063/files
Webrev: https://webrevs.openjdk.or
15 matches
Mail list logo