On Tue, 29 Oct 2024 11:58:44 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:

> Second problem is the behavior for boxed Integers outside [-128; 127] range. 
> JLS 5.1.7 has no provisions about the identity of these boxes: neither a 
> guarantee they would be cached, nor a guarantee that they would _not_ be 
> cached. JLS 5.1.7 note explicitly calls that out: "For other values, the rule 
> disallows any assumptions about the identity of the boxed values on the 
> programmer's part. This allows (but does not require) sharing of some or all 
> of these references.".

That reassuring. Thanks for finding that in the spec! I think that removes the 
cancer.

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

PR Comment: https://git.openjdk.org/jdk/pull/21737#issuecomment-2448143169

Reply via email to