src/java.base/share/classes/java/util/Arrays.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
8076112 Cdiff src/java.base/share/classes/java/util/Arrays.java
src/java.base/share/classes/java/util/Arrays.java
Print this page
*** 40,49 ****
--- 40,50 ----
import java.util.stream.DoubleStream;
import java.util.stream.IntStream;
import java.util.stream.LongStream;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
+ import jdk.internal.HotSpotIntrinsicCandidate;
/**
* This class contains various methods for manipulating arrays (such as
* sorting and searching). This class also contains a static factory
* that allows arrays to be viewed as lists.
*** 2652,2661 ****
--- 2653,2663 ----
*
* @param a one array to be tested for equality
* @param a2 the other array to be tested for equality
* @return <tt>true</tt> if the two arrays are equal
*/
+ @HotSpotIntrinsicCandidate
public static boolean equals(char[] a, char[] a2) {
if (a==a2)
return true;
if (a==null || a2==null)
return false;
*** 3203,3212 ****
--- 3205,3215 ----
* @throws ArrayStoreException if an element copied from
* <tt>original</tt> is not of a runtime type that can be stored in
* an array of class <tt>newType</tt>
* @since 1.6
*/
+ @HotSpotIntrinsicCandidate
public static <T,U> T[] copyOf(U[] original, int newLength, Class<? extends T[]> newType) {
@SuppressWarnings("unchecked")
T[] copy = ((Object)newType == (Object)Object[].class)
? (T[]) new Object[newLength]
: (T[]) Array.newInstance(newType.getComponentType(), newLength);
*** 3472,3481 ****
--- 3475,3485 ----
* @throws ArrayStoreException if an element copied from
* <tt>original</tt> is not of a runtime type that can be stored in
* an array of class <tt>newType</tt>.
* @since 1.6
*/
+ @HotSpotIntrinsicCandidate
public static <T,U> T[] copyOfRange(U[] original, int from, int to, Class<? extends T[]> newType) {
int newLength = to - from;
if (newLength < 0)
throw new IllegalArgumentException(from + " > " + to);
@SuppressWarnings("unchecked")
src/java.base/share/classes/java/util/Arrays.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File