Hi Staffan,
The new version looks good to me; thanks,
-Joe
On 12/11/2014 5:25 PM, Staffan Friberg wrote:
Hi Joe,
Good point. Updated webrev,
http://cr.openjdk.java.net/~sfriberg/JDK-8067289/webrev.01
Regards,
Staffan
On 12/11/2014 11:23 AM, joe darcy wrote:
Hi Staffan,
I haven't examined the code for possible integer overflow cases, but
it would be fundamentally safer if the values were promoted to long
*before* the arithmetic rather than after. In other words, instead of
(long)(Unsafe.ARRAY_BYTE_BASE_OFFSET + off) // Overflow
theoretically possible
use
(long)Unsafe.ARRAY_BYTE_BASE_OFFSET + off // No overflow worries
with int inputs
-Joe
On 12/11/2014 11:19 AM, Staffan Friberg wrote:
Hi,
Here is a small fix that avoids calling deprecated sun.misc.Unsafe
methods, which allows the @SuppressWarnings to be removed.
Bug: https://bugs.openjdk.java.net/browse/JDK-8067289
Webrev: http://cr.openjdk.java.net/~sfriberg/JDK-8067289/webrev.00
Regards,
Staffan