Please review JDK-8059321

Aleksey Shipilev aleksey.shipilev at
Mon Sep 29 17:52:59 UTC 2014

On 09/29/2014 09:45 PM, Attila Szegedi wrote:
> I'd also like it if you used:
> - a "new Object()" instead of "valid".intern() for VALID_CACHE values

"valid".intern() is dumb anyway -- compile-time String constants are
already interned.

> - containsKey(key) instead of get(key) == null with VALID_CACHE.
> (these are just niceties)

The entire shenanigan would go away if you turn the Map into Set with
Collections.newSetFromMap(...), and then do add().


More information about the nashorn-dev mailing list