jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template
changeset 38358 cb99c6d2af1b
parent 37719 add11bc0e6e2
parent 38356 1e4ecca97792
child 38367 21801e8e9344
--- a/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template	Fri May 06 06:23:30 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template	Mon May 09 12:39:41 2016 +0300
@@ -25,6 +25,7 @@
 package java.lang.invoke;
 
 import jdk.internal.misc.Unsafe;
+import jdk.internal.util.Preconditions;
 import jdk.internal.vm.annotation.ForceInline;
 
 import java.nio.ByteBuffer;
@@ -78,7 +79,7 @@
 
         @ForceInline
         static int index(byte[] ba, int index) {
-            return Objects.checkIndex(index, ba.length - ALIGN, null);
+            return Preconditions.checkIndex(index, ba.length - ALIGN, null);
         }
 
         @ForceInline
@@ -297,14 +298,14 @@
 
         @ForceInline
         static int index(ByteBuffer bb, int index) {
-            return Objects.checkIndex(index, UNSAFE.getInt(bb, BUFFER_LIMIT) - ALIGN, null);
+            return Preconditions.checkIndex(index, UNSAFE.getInt(bb, BUFFER_LIMIT) - ALIGN, null);
         }
 
         @ForceInline
         static int indexRO(ByteBuffer bb, int index) {
             if (UNSAFE.getBoolean(bb, BYTE_BUFFER_IS_READ_ONLY))
                 throw new ReadOnlyBufferException();
-            return Objects.checkIndex(index, UNSAFE.getInt(bb, BUFFER_LIMIT) - ALIGN, null);
+            return Preconditions.checkIndex(index, UNSAFE.getInt(bb, BUFFER_LIMIT) - ALIGN, null);
         }
 
         @ForceInline