Merge
This commit is contained in:
commit
5f1eb58771
@ -27,6 +27,7 @@ package java.util;
|
|||||||
|
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
import jdk.internal.HotSpotIntrinsicCandidate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class consists of {@code static} utility methods for operating
|
* This class consists of {@code static} utility methods for operating
|
||||||
@ -416,14 +417,14 @@ public final class Objects {
|
|||||||
* @throws IndexOutOfBoundsException if the {@code index} is out of bounds
|
* @throws IndexOutOfBoundsException if the {@code index} is out of bounds
|
||||||
* and the exception mapping function is {@code null}
|
* and the exception mapping function is {@code null}
|
||||||
* @since 9
|
* @since 9
|
||||||
*/
|
*
|
||||||
/*
|
* @implNote
|
||||||
@HotSpotIntrinsicCandidate
|
* This method is made intrinsic in optimizing compilers to guide
|
||||||
This method will be made intrinsic in C2 to guide HotSpot to perform
|
* them to perform unsigned comparisons of the index and length
|
||||||
unsigned comparisons of the index and length when it is known the length is
|
* when it is known the length is a non-negative value (such as
|
||||||
a non-negative value (such as that of an array length or from the upper
|
* that of an array length or from the upper bound of a loop)
|
||||||
bound of a loop)
|
|
||||||
*/
|
*/
|
||||||
|
@HotSpotIntrinsicCandidate
|
||||||
public static <T extends RuntimeException>
|
public static <T extends RuntimeException>
|
||||||
int checkIndex(int index, int length,
|
int checkIndex(int index, int length,
|
||||||
BiFunction<Integer, Integer, T> oobe) throws T, IndexOutOfBoundsException {
|
BiFunction<Integer, Integer, T> oobe) throws T, IndexOutOfBoundsException {
|
||||||
|
Loading…
Reference in New Issue
Block a user