# HG changeset patch # User neliasso # Date 1447702642 -3600 # Node ID 1ed386980b80208af26d4346d4bc20676ae4636f # Parent 86bdadec72c97a7ed73a8ddd6718715e25046996# Parent 7dfab3d8f8aaaabd428f06336bdc9c6f4b5b9064 Merge diff -r 86bdadec72c9 -r 1ed386980b80 jdk/src/java.base/share/classes/java/util/Objects.java --- a/jdk/src/java.base/share/classes/java/util/Objects.java Wed Nov 11 23:45:51 2015 +0000 +++ b/jdk/src/java.base/share/classes/java/util/Objects.java Mon Nov 16 20:37:22 2015 +0100 @@ -27,6 +27,7 @@ import java.util.function.BiFunction; import java.util.function.Supplier; +import jdk.internal.HotSpotIntrinsicCandidate; /** * This class consists of {@code static} utility methods for operating @@ -416,14 +417,14 @@ * @throws IndexOutOfBoundsException if the {@code index} is out of bounds * and the exception mapping function is {@code null} * @since 9 - */ - /* + * + * @implNote + * This method is made intrinsic in optimizing compilers to guide + * them to perform unsigned comparisons of the index and length + * when it is known the length is a non-negative value (such as + * that of an array length or from the upper bound of a loop) + */ @HotSpotIntrinsicCandidate - This method will be made intrinsic in C2 to guide HotSpot to perform - unsigned comparisons of the index and length when it is known the length is - a non-negative value (such as that of an array length or from the upper - bound of a loop) - */ public static int checkIndex(int index, int length, BiFunction oobe) throws T, IndexOutOfBoundsException {