privatestaticvoid check(String val, int expected) { int n = (Integer.decode(val)).intValue();
( ! ) thrownew RuntimeException("Integer.decode }
}
privatestaticvoid java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 try {
( ){/* Okay */}
newmessage;
} catchjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
(0-" java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 90 "+10,"java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 90
checkFailure("+", "Raw plus sign checkFailure("0x10" "ntegerdecodeallows positive inwrongposition.;
(+, Rawjava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 58
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(.()java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 82
checkFailure("", "Empty String");
try {
Integer.decode(null); throw java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
( npe){/* Okay */}
}
}