1.1 --- a/emul/src/main/java/java/lang/String.java Sat Sep 29 10:47:42 2012 +0200
1.2 +++ b/emul/src/main/java/java/lang/String.java Sun Sep 30 17:10:32 2012 -0700
1.3 @@ -811,7 +811,7 @@
1.4 * This method doesn't perform any range checking.
1.5 */
1.6 void getChars(char dst[], int dstBegin) {
1.7 - System.arraycopy(value, offset, dst, dstBegin, count);
1.8 + arraycopy(value, offset, dst, dstBegin, count);
1.9 }
1.10
1.11 /**
1.12 @@ -854,7 +854,7 @@
1.13 if (srcBegin > srcEnd) {
1.14 throw new StringIndexOutOfBoundsException(srcEnd - srcBegin);
1.15 }
1.16 - System.arraycopy(value, offset + srcBegin, dst, dstBegin,
1.17 + arraycopy(value, offset + srcBegin, dst, dstBegin,
1.18 srcEnd - srcBegin);
1.19 }
1.20
1.21 @@ -2435,7 +2435,7 @@
1.22 // * is the write location in result */
1.23 //
1.24 // /* Just copy the first few lowerCase characters. */
1.25 -// System.arraycopy(value, offset, result, 0, firstUpper);
1.26 +// arraycopy(value, offset, result, 0, firstUpper);
1.27 //
1.28 // String lang = locale.getLanguage();
1.29 // boolean localeDependent =
1.30 @@ -2481,7 +2481,7 @@
1.31 // int mapLen = lowerCharArray.length;
1.32 // if (mapLen > srcCount) {
1.33 // char[] result2 = new char[result.length + mapLen - srcCount];
1.34 -// System.arraycopy(result, 0, result2, 0,
1.35 +// arraycopy(result, 0, result2, 0,
1.36 // i + resultOffset);
1.37 // result = result2;
1.38 // }
1.39 @@ -2602,7 +2602,7 @@
1.40 * is the write location in result *
1.41
1.42 /* Just copy the first few upperCase characters. *
1.43 - System.arraycopy(value, offset, result, 0, firstLower);
1.44 + arraycopy(value, offset, result, 0, firstLower);
1.45
1.46 String lang = locale.getLanguage();
1.47 boolean localeDependent =
1.48 @@ -2645,7 +2645,7 @@
1.49 int mapLen = upperCharArray.length;
1.50 if (mapLen > srcCount) {
1.51 char[] result2 = new char[result.length + mapLen - srcCount];
1.52 - System.arraycopy(result, 0, result2, 0,
1.53 + arraycopy(result, 0, result2, 0,
1.54 i + resultOffset);
1.55 result = result2;
1.56 }
1.57 @@ -3029,15 +3029,20 @@
1.58 throw new IllegalArgumentException(from + " > " + to);
1.59 }
1.60 char[] copy = new char[newLength];
1.61 - System.arraycopy(original, from, copy, 0,
1.62 + arraycopy(original, from, copy, 0,
1.63 Math.min(original.length - from, newLength));
1.64 return copy;
1.65 }
1.66 static char[] copyOf(char[] original, int newLength) {
1.67 char[] copy = new char[newLength];
1.68 - System.arraycopy(original, 0, copy, 0,
1.69 + arraycopy(original, 0, copy, 0,
1.70 Math.min(original.length, newLength));
1.71 return copy;
1.72 }
1.73 + static void arraycopy(
1.74 + char[] value, int srcBegin, char[] dst, int dstBegin, int count
1.75 + ) {
1.76 + System.arraycopy(value, srcBegin, dst, dstBegin, count);
1.77 + }
1.78
1.79 }