JDK-8148068 long is no longer a number

Hannes Wallnoefer hannes.wallnoefer at oracle.com
Tue Apr 26 10:13:34 UTC 2016


Hi Florian,

Sorry about that. When we made that change we were aware of the fact 
that it could break existing code. However, the behaviour we had 
(treating longs as JS numbers) also caused some very real bugs when 
numbers grew larger than 53 bits. After some back and forth we decided 
to solve this issue the way we did.

Can you please point me to the function in moment.js that breaks? It 
would be interesting to see what that code does and whether there is 
something we can do about it.

Regards,
Hannes


Am 2016-04-26 um 11:53 schrieb Florian Bruckner (3kraft):
> Guys,
>
> <rant>
>
> you need to stop introducing changes like these into jdk8u. It has 
> been the third or fourth time a change in Nashorn in jdk8u has broken 
> our application.
>
> What broke this time was that we are passing a java epoch as long to 
> nashorn and use this to construct a date from it (with moment.js) and 
> do some calculations around this date. Because long is no longer a 
> number, moment.js does no longer construct a (correct) date.
>
> </rant>
>
> Thanks for listening and sorry about the ranting.
>
> regards
>
> Florian



More information about the nashorn-dev mailing list