< prev index next >

src/java.base/share/classes/java/lang/String.java

Print this page

        

*** 1718,1728 **** * @param tgtStr the characters being searched for. * @param fromIndex the index to begin searching from. */ static int indexOf(byte[] src, byte srcCoder, int srcCount, String tgtStr, int fromIndex) { - byte[] tgt = tgtStr.value; byte tgtCoder = tgtStr.coder(); int tgtCount = tgtStr.length(); if (fromIndex >= srcCount) { --- 1718,1727 ----
*** 3101,3111 **** * * @throws StringIndexOutOfBoundsException * If {@code offset} is negative, {@code count} is negative, * or {@code offset} is greater than {@code length - count} */ ! private static void checkBoundsOffCount(int offset, int count, int length) { if (offset < 0 || count < 0 || offset > length - count) { throw new StringIndexOutOfBoundsException( "offset " + offset + ", count " + count + ", length " + length); } } --- 3100,3110 ---- * * @throws StringIndexOutOfBoundsException * If {@code offset} is negative, {@code count} is negative, * or {@code offset} is greater than {@code length - count} */ ! static void checkBoundsOffCount(int offset, int count, int length) { if (offset < 0 || count < 0 || offset > length - count) { throw new StringIndexOutOfBoundsException( "offset " + offset + ", count " + count + ", length " + length); } }
< prev index next >