RFR: 8284908: Refine diagnostic positions for DCErroneous
Pavel Rappo
prappo at openjdk.java.net
Fri Apr 15 17:15:36 UTC 2022
On Fri, 15 Apr 2022 16:58:55 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
> Before:
>
> Standard Doclet version 18+36-2087
> Building tree for all the packages and classes...
> Generating /tmp/whatever/ExampleDiagnostics.html...
> ExampleDiagnostics.java:5: error: unexpected content
> * {@docRoot a}
> ^
> ExampleDiagnostics.java:11: error: unexpected content
> * {@inheritDoc a}
> ^
> ExampleDiagnostics.java:17: error: '>' expected
> * @param <T param
> ^
>
> After:
>
> Standard Doclet version 19-internal-2022-04-07-1105474.pavelrappo...
> Building tree for all the packages and classes...
> Generating /tmp/whatever/ExampleDiagnostics.html...
> ExampleDiagnostics.java:5: error: unexpected content
> * {@docRoot a}
> ^
> ExampleDiagnostics.java:11: error: unexpected content
> * {@inheritDoc a}
> ^
> ExampleDiagnostics.java:17: error: '>' expected
> * @param <T param
> ^
A drive-by observation: shouldn't we allow whitespace in between the type variable and the closing `>`?
Currently, this is valid:
@param < T> param
while this is not:
@param <T > param
If we decide to allow whitespace in between the type variable and the closing `>`, it should be done in a separate PR.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8264
More information about the compiler-dev
mailing list