Menu

#13 Doesn't like hex

closed
5
2003-12-24
2003-12-22
No

When I try to compile my app, I get the stack trace
below. Two problems here: first, it doesn't identify the
source file. (I'm compiling a whole directory of files).
Second, a search for "FFFFFFFF" in my source code finds
several instances in the following forms:

0xFFFFFFFF
0xFFFFFFFFL
0x00000000FFFFFFFF

Exception in thread "main"
java.lang.NumberFormatException: For input string: "F
FFFFFFF"
at java.lang.NumberFormatException.forInputString
(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at net.janino.Scanner.internalRead(Unknown
Source)
at net.janino.Scanner.read(Unknown Source)
at net.janino.Parser.parseSelector(Unknown
Source)
at net.janino.Parser.parseUnaryExpression
(Unknown Source)
at net.janino.Parser.parseMultiplicativeExpression
(Unknown Source)
at net.janino.Parser.parseAdditiveExpression
(Unknown Source)

Discussion

  • Chris Cleveland

    Chris Cleveland - 2003-12-22
    • labels: --> Software bugs
     
  • Chris Cleveland

    Chris Cleveland - 2003-12-22
    • assigned_to: nobody --> mecki
     
  • Arno Unkrig

    Arno Unkrig - 2003-12-24
    • status: open --> closed
     
  • Arno Unkrig

    Arno Unkrig - 2003-12-24

    Logged In: YES
    user_id=865893

    Java allows decimal integer literals from -2^31...2^31-1
    (-0x80000000...0x7fffffff), while octal and hexadecimal
    integer literals are allowed from -2^32-1...2^32-1
    (-0xffffffff...0xffffffff). Janino always only allowed
    -2^31...2^31-1.

    Fixed.

    Will be released in version 1.0.7.

     

Log in to post a comment.

MongoDB Logo MongoDB