RFR: 8221723: Avoid storing zero to String.hash
claes.redestad at oracle.com
Mon Apr 1 13:28:24 UTC 2019
On 2019-04-01 15:17, Pavel Rappo wrote:
>> On 1 Apr 2019, at 13:36, Claes Redestad <claes.redestad at oracle.com> wrote:
>> Makes sense?
> It does, thanks. I wonder though what portion of strings in a typical app has a
> calculated `hash` of 0? My naive estimate would be 1E-9. Unless I'm mistaken,
> is that really of concern?
Specifically I'm looking at an archiving RFE that is blocked by the fact
that interned empty String literals loses identity when archived and
reconstituted, and there exists code that does identity comparisons on
such interned empty String, e.g.:
More information about the core-libs-dev