classpath progress

This commit is contained in:
Joel Dice
2007-07-28 20:15:45 -06:00
parent a9e10d1c7f
commit 51943427ad
9 changed files with 120 additions and 11 deletions

View File

@ -173,7 +173,7 @@ public final class String implements Comparable<String> {
public void getBytes(int srcOffset, int srcLength,
byte[] dst, int dstOffset)
{
if (srcOffset + srcLength > length) {
if (srcOffset < 0 || srcOffset + srcLength > length) {
throw new IndexOutOfBoundsException();
}
@ -197,7 +197,7 @@ public final class String implements Comparable<String> {
public void getChars(int srcOffset, int srcLength,
char[] dst, int dstOffset)
{
if (srcOffset + srcLength > length) {
if (srcOffset < 0 || srcOffset + srcLength > length) {
throw new IndexOutOfBoundsException();
}