amaembo at gmail.com
Fri Nov 1 12:13:34 UTC 2019
javax.tools.Diagnostic#getColumnNumber spec currently says :
> Returns the column number of the character offset returned by getPosition().
This spec says nothing about handling the tabulation ('\t') character.
Current javac implementation increases column to the next number
divisible by 8 every time the tabulation character is encountered.
Nowadays people use different tab widths, so I would not say that
everybody would expect this behavior by default. I suggest improving
the specification of this method adding the information about how
tabulations are handled. What do you think? Is it a useful change?
Also, there's a small typo in the getPosition() method spec :
Returns a character offset from the beginning of the source object
associated with this diagnostic that indicates the location of the
problem. In addition, the following must be true:
getStartPostion() <= getPosition() <----- should be getStartPostion
('i' is missing)
getPosition() <= getEndPosition()
With best regards,
More information about the compiler-dev