java version "1.6.0_02"
Java(TM) SE Runtime Environment (build
1.6.0_02-b05)
Java HotSpot(TM) Client VM (build 1.6.0_02-b05, mixed mode)
Does this problem occur on J2SE 1.4.x or 5.0.x ? Yes / No (pick one)
Not known
Operating System Configuration Information (be specific):
Windows Vista
Hardware Configuration Information (be specific):
AMD Athlon X2-64 2Gb RAM
Bug Description:
Integer.parseInt does not accept hexadecimal ffffffff.
Steps to Reproduce (be specific):
Compile and run this program:
public class ParseIntErr {
public static void main(String[] args){
int n = Integer.parseInt(args[0],16);
}
}
E:\alcatel\borsotti\jtest>java ParseIntErr ffffffff
Exception in thread "main" java.lang.NumberFormatException: For input string: "ffffffff"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt
(Unknown Source)
at ParseIntErr.main(ParseIntErr.java:3)
It is wierd that ParseInt cannot accept an integer that can be specified
in a java source program.