On Thu, 1 May 2025 09:05:58 GMT, Maurizio Cimadamore <[email protected]>
wrote:
>> src/java.base/share/classes/jdk/internal/foreign/BufferStack.java line 81:
>>
>>> 79: @Override
>>> 80: public int hashCode() {
>>> 81: return System.identityHashCode(this);
>>
>> What's the value in these overloads? Isn't this implementation the same we'd
>> get if there were no overrides?
>
> Ugh - it's a record, I see. Which brings up the question -- should it be a
> record? Should it advertize its `size and `tl` components (they seem rather
> implementation specific?).
Was this done so that the final field could be trusted? (I believe all final
fields are implicitly trusted in jdk/internal/foreign):
holder->is_in_package("jdk/internal/foreign/layout") ||
holder->is_in_package("jdk/internal/foreign") ||
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24829#discussion_r2070024350