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

Guoxiong Li github.com+13688759+lgxbslgx at openjdk.java.net
Wed Nov 25 16:43:58 UTC 2020

On Wed, 25 Nov 2020 13:42:01 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_10.java line 24:
>> 22:  */
>> 23: 
>> 24: class T8255968 {
> Can you please disambiguate all these class names? Having the same class name in multiple tests can create havocs, especially when running in concurrent mode. Please make sure that classes have different names, and that the auxiliary classes defined in these test are, instead, defined as nested classes (so that, again, everything will be encapsulated on a test-by-test basis, w/o any risk of a test picking up a class from another test).

It sounds a great way to avoid some problem. I would revise my code to meet this style. Thanks for the suggestion.


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

More information about the compiler-dev mailing list