This cache thing is my least favourite behavior in the entire JLS. Crazy that it’s actually a mandated part of the language specification.
+1 /M > On 13 Jun 2017, at 18:28, Hannes Wallnöfer <hannes.wallnoe...@oracle.com> > wrote: > > >> Am 13.06.2017 um 18:17 schrieb Attila Szegedi <szege...@gmail.com>: >> >> the test described in the issue was failing because we treated Long objects >> as JS objects, right? >> > > Yes. 127 compared equal to itself because Long instances between -128 and 127 > are cached, 128 is just outside that range. > > Thanks for the review! > Hannes > >> Attila. >> >>> On 13 Jun 2017, at 17:51, Hannes Wallnöfer <hannes.wallnoe...@oracle.com> >>> wrote: >>> >>> Please review: >>> >>> Bug: https://bugs.openjdk.java.net/browse/JDK-8181191 >>> Webrev: http://cr.openjdk.java.net/~hannesw/8181191/webrev/ >>> >>> Thanks, >>> Hannes >> >