Improvements to javac diagnostics (not an RFR yet)
Alex Buckley
alex.buckley at oracle.com
Mon Oct 7 09:46:02 PDT 2013
Again:
- compiler.err.invalid.repeatable.annotation.retention: ... Also there's
an unnecessary "retention" in the middle.
That is, say "is shorter than" not "is shorter retention than".
And:
- compiler.err.duplicate.annotation.invalid.repeated: This message is
pretty odd - it has a new line, and it mentions "annotation {0}" rather
than "annotation @{0}", and it mentions "valid containing annotation"
which is not a phrase you'll find in the JLS. You could say no container
annotation is available, but better just to say that the type {0} is not
repeatable.
- compiler.err.duplicate.annotation.missing.containing.type and others
mention a "Repeatable" when they mean either "@Repeatable" or
"repeatable annotation type". Please search for Repeatable carefully.
Alex
On 10/4/2013 7:50 AM, Eric McCorkle wrote:
> I've applied your suggestions.
>
> The updated webrev is here:
> http://cr.openjdk.java.net/~emc/8019461/webrev.01/
>
> On 10/03/13 20:30, Alex Buckley wrote:
>> It sure would be easier to read if there were separate patches for
>> compiler.properties, one per functional area (imports, annotations,
>> annotation types, etc).
>>
>> Some specific messages:
>>
>> - compiler.err.invalid.repeatable.annotation.value.return: I don't know
>> why the message says "duplicate annotation". Also, "containing
>> annotation" should be "containing annotation type".
>>
>> - compiler.err.duplicate.annotation.missing.containing.type: Also says
>> "duplicate annotation" for no reason.
>>
>> - compiler.err.invalid.repeatable.annotation.retention: "containing
>> annotation" should be "containing annotation type". Also there's an
>> unnecessary "retention" in the middle.
>>
>> - compiler.err.invalid.repeatable.annotation.incompatible.target:
>> "containing annotation" should be "containing annotation type".
>>
>> - compiler.err.intf.annotation.cant.have.type.params: mentions
>> "annotation type" followed by an @ !
>>
>> - compiler.err.intf.annotation.member.clash: ditto.
>>
>> - compiler.err.repeatable.annotations.not.supported.in.source: should be
>> "repeated" not "repeatable" in the key and message. I presume this error
>> is about annotations, which are repeated, as opposed to being about
>> annotation types, which are repeatable.
>>
>> - compiler.err.foreach.not.supported.in.source: Officially the term is
>> "enhanced for loops" rather than "for-each loops".
>>
>> FYI please link to the exact 01, 02, ... URL in future revisions.
>>
>> Alex
>>
>> On 10/3/2013 4:21 PM, Eric McCorkle wrote:
>>> This webrev has a set of changes to javac diagnostic messages to improve
>>> their readability and coherence with the JLS.
>>>
>>> Please look over them and make any suggestions for additional changes.
>>>
>>> Note that this is not a formal review request, and there are probably
>>> tests that will fail due to these changes.
>>>
>>> The webrev is here:
>>> http://cr.openjdk.java.net/~emc/8019461/
>>>
More information about the compiler-dev
mailing list