Closed shuheiktgw closed 3 months ago
Integer covers this range as well: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html
Closing, as there is nothing to fix here.
@pisv Wait, why is it closing? IIUC, the Integer class mentioned above is different from int. Java's native int is a 32-bit signed integer, so the maximum value is not 2^31 - 1 but 2^30. I believe what @nixel2007 meant was that we could use the Integer class instead of long, but did I miss something? 🤔
Ah sorry, I must have misunderstood something. Let me think about it...
int also uses the same boundaries :)
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html
Yes, my bad, sorry I miscalculated it 🙇
Currently, the Position's line and character fields are int, but according to the latest protocol definition, the fields should be uinteger, which can be 0 to 2^31 - 1. Therefore, I believe they should have been long 🙂