< prev index next >
modules/javafx.graphics/src/main/java/com/sun/marlin/ByteArrayCache.java
Print this page
rev 10819 : 8195801: Replace jdk.internal.misc.Unsafe with sun.misc.Unsafe in MarlinFX
Reviewed-by:
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -228,16 +228,12 @@
}
}
}
static byte[] createArray(final int length, final boolean clean) {
- if (clean) {
return new byte[length];
}
- // use JDK9 Unsafe.allocateUninitializedArray(class, length):
- return (byte[]) OffHeapArray.UNSAFE.allocateUninitializedArray(byte.class, length);
- }
static void fill(final byte[] array, final int fromIndex,
final int toIndex, final byte value)
{
// clear array data:
< prev index next >