eclipse-lsp4j / lsp4j

A Java implementation of the language server protocol intended to be consumed by tools and language servers implemented in Java.

Home Page:https://eclipse.org/lsp4j

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Position's line and character fields should be long, not int

shuheiktgw opened this issue Β· comments

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 πŸ™‚

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...

Yes, my bad, sorry I miscalculated it πŸ™‡