Skip to content

Commit

Permalink
Merge pull request #19790 from knn-k/removeCanEncodeAsLatin1
Browse files Browse the repository at this point in the history
Remove JITHelpers.canEncodeAsLatin1() from Java 17+
  • Loading branch information
pshipton authored Jul 3, 2024
2 parents e5b1460 + cb83d90 commit 2f8672c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jcl/src/java.base/share/classes/com/ibm/jit/JITHelpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ public char getCharFromArrayByIndex(Object obj, int index) {
}
}

/*[IF JAVA_SPEC_VERSION < 17]*/
public boolean canEncodeAsLatin1(byte[] array, int start, int length) {
int index = start << 1;
if (!IS_BIG_ENDIAN) {
Expand All @@ -578,6 +579,7 @@ public boolean canEncodeAsLatin1(byte[] array, int start, int length) {
}
return true;
}
/*[ENDIF] JAVA_SPEC_VERSION < 17 */

/**
* Returns the first index of the target character array within the source character array starting from the specified
Expand Down

0 comments on commit 2f8672c

Please sign in to comment.