Thanks Attila for making me aware of this and suggesting this solution.
> Am 16.08.2016 um 15:13 schrieb Attila Szegedi <szege...@gmail.com>: > > +1 > >> On 16 Aug 2016, at 14:51, Hannes Wallnöfer <hannes.wallnoe...@oracle.com> >> wrote: >> >> Please review 8163945: Honor Number type hint in toPrimitive on Numbers: >> >> Bug: https://bugs.openjdk.java.net/browse/JDK-8163945 >> Webrev: http://cr.openjdk.java.net/~hannesw/8163945/ >> >> Thanks, >> Hannes >