# HG changeset patch # User amurillo # Date 1448653460 28800 # Node ID cf0d32a9d9eaf6f9147af19f73d6f53088288baf # Parent eddd54f8891ec7e3a5824f6919e85903fe482f2c# Parent 1b8b4b0b160800cd8efddf085688477159de43a3 Merge diff -r eddd54f8891e -r cf0d32a9d9ea jdk/src/java.base/share/classes/java/util/Objects.java --- a/jdk/src/java.base/share/classes/java/util/Objects.java Fri Nov 27 11:30:46 2015 +0100 +++ b/jdk/src/java.base/share/classes/java/util/Objects.java Fri Nov 27 11:44:20 2015 -0800 @@ -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 @@ -420,14 +421,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 {