PaulS:
But the problem is more serious than documentation issues...
When I assign the result to an int per the documentation I get overflow. Basically, it seems to be overflowing as if parseInt() is returning a short.If you know the documentation is wrong, why are you assigning the return value to an int?
When I assign the result to a long per the return type implemented in Stream.parseInt() all is well and I get no overflow.
Well, duh.
Can anyone officially explain this overflow?
It's what happens when you try to stuff a large value in a small memory location.
Hey PaulS,
Wow, you were so focused on being rude you couldn't answer the question. Well Duh... you didn't explain how it overflows as a short value when being assigned to an int.
Anyway, it is important for other people to realize that you don't just get the value truncated to an 'int' if you use an int type, but you get a 'short'. Serious unexpected data loss. This is not obvious and it is important for others to know this too.
Core