RFR: 8255968: Confusing error message for inaccessible constructor [v3]

Guoxiong Li github.com+13688759+lgxbslgx at openjdk.java.net
Wed Nov 25 17:00:59 UTC 2020


On Wed, 25 Nov 2020 13:42:48 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Guoxiong Li has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - Change the `Test(String x)` from private to default. Add comments in test cases to improve readability.
>>  - Add corresponding tests for the method reference cases.
>>  - Add comments to state the situations
>
> test/langtools/tools/javac/T8255968/T8255968.java line 27:
> 
>> 25:  * @test
>> 26:  * @bug 8255968
>> 27:  * @summary Confusing error message for inaccessible constructor
> 
> Any reason as to why you went for this single file which lists all tests rather than adding jtreg tags in all the various test cases? AFAIK, in the javac code base the latter style is often preferred.

I have seem these two styles in the test code base. I don't prefer any style because these two styles both work well. It is better to have a standard style to guide developers. But now it has no such standard.

> AFAIK, in the javac code base the latter style is often preferred.

According to your comment, I would revise the tests to meets the latter style.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1389


More information about the compiler-dev mailing list