JDK 16 RFR of JDK-8251921: Expand default constructor warning to cover more cases
Joe Darcy
joe.darcy at oracle.com
Wed Aug 26 23:40:47 UTC 2020
On 8/25/2020 5:08 PM, Alex Buckley wrote:
> CSR looks good.
Added you as a reviewer.
>
> I note that no change is needed to the compiler message which was
> ultimately chosen for this lint warning -- "class {0} in exported
> package {1} declares no explicit constructors, thereby exposing a
> default constructor to clients of module {2}"
> (http://hg.openjdk.java.net/jdk/jdk/rev/f74d10596242#l5.8)
I concur the other message does not need to be updated; I checked that
before sending out the review, but didn't note it.
Thanks for the thorough review,
-Joe
>
> Alex
>
> On 8/25/2020 4:31 PM, Joe Darcy wrote:
>> Hello,
>>
>> As a follow-up to JDK-8071961: "Add javac lint warning when a default
>> constructor is created," Phil observed that there are cases in the
>> JDK where a *protected* class has a default constructor appearing in
>> the JDK. Please review the changes and CSR to augment the warning to
>> cover both public and protected classes. For nested classes, the
>> enclosing types must be either public or protected all the way up for
>> the warning to be issued.
>>
>> JDK-8251921: Expand default constructor warning to cover more cases
>> CSR: https://bugs.openjdk.java.net/browse/JDK-8252348
>> webrev: http://cr.openjdk.java.net/~darcy/8251921.0/
>>
>> Patch below. Clean langtools test run with this change.
>>
>> Thanks,
>>
>> -Joe
More information about the compiler-dev
mailing list