RFR: 8065988: Duplicated error messages for "no source file" in javac
Jonathan Gibbons
jonathan.gibbons at oracle.com
Thu Nov 27 02:47:55 UTC 2014
Thank you.
We're headed into a holiday weekend here in the US, so I may not get
back to this before next week.
-- Jon
On 11/26/2014 06:29 PM, bitter_fox wrote:
> Jonathan,
>
> Thank you for your review.
> Retry is here:
> http://cr.openjdk.java.net/~shinyafox/8065988/webrev.02/
> <http://cr.openjdk.java.net/%7Eshinyafox/8065988/webrev.02/>
>
> Regards,
> Shinya Yoshida(@bitter_fox, shinyafox)
>
>
> 2014-11-27 6:26 GMT+09:00 Jonathan Gibbons
> <jonathan.gibbons at oracle.com <mailto:jonathan.gibbons at oracle.com>>:
>
> Shinya,
>
> It would be better to just do the increment in the "case LOG:"
> case, when the message is actually reported to the log. In the
> other two arms of the switch statement, an exception is thrown
> instead of reporting anything to the log.
>
> -- Jon
>
>
>
> On 11/26/2014 12:25 PM, bitter_fox wrote:
>> Another fix is here:
>> http://cr.openjdk.java.net/~shinyafox/8065988/webrev.01/
>> <http://cr.openjdk.java.net/%7Eshinyafox/8065988/webrev.01/>
>>
>> increment log.nerrors in Argument#error.
>>
>> I don't know which is better, but it looks beautiful.
>>
>>
>> 2014-11-27 4:59 GMT+09:00 bitter_fox <bitterfoxc at gmail.com
>> <mailto:bitterfoxc at gmail.com>>:
>>
>> Hi, Jonathan.
>>
>> Because log.nerror is never incremented by printing "file not
>> found" error.
>>
>> The error printed in Argument#error:
>> case ILLEGAL_ARGUMENT: {
>> String msg = log.localize(PrefixKind.JAVAC,
>> key, args);
>> throw new PropagatedException(new
>> IllegalArgumentException(msg));
>> }
>>
>> It calls Log#localize, and it doesn't increment log.nerrors.
>>
>> So in this case, I think log.nerrors won't work well.
>>
>> Regards,
>> Shinya Yoshida(@bitter_fox, shinyafox)
>>
>>
>> 2014-11-27 4:44 GMT+09:00 Jonathan Gibbons
>> <jonathan.gibbons at oracle.com
>> <mailto:jonathan.gibbons at oracle.com>>:
>>
>> On 11/26/2014 11:28 AM, bitter_fox wrote:
>>
>> Hi,
>> Please review my patch for 8065988.
>>
>> I couldn't write the test.
>> Could you write the test for this issue?
>>
>> webrev is here:
>> http://cr.openjdk.java.net/~shinyafox/8065988/webrev.00/
>> <http://cr.openjdk.java.net/%7Eshinyafox/8065988/webrev.00/>
>> <http://cr.openjdk.java.net/%7Eshinyafox/8065988/webrev.00/>
>>
>> bugs is here:
>> https://bugs.openjdk.java.net/browse/JDK-8065988
>>
>> Regards,
>> Shinya Yoshida(@bitter_fox, shinyafox)
>>
>>
>> Shinya,
>>
>> I've read through your patch, but I'd be looking to
>> understand why you need to pass back and use a boolean
>> result from Arguments.init rather than use the existing
>> mechanism of checking log.nerrors.
>>
>> -- Jon
>>
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20141126/59523f5b/attachment.html>
More information about the compiler-dev
mailing list