RFR: JDK-8250768: javac should be adapted to changes in JEP 12 [v4]

Jan Lahoda jlahoda at openjdk.java.net
Tue Oct 27 16:14:33 UTC 2020

On Fri, 23 Oct 2020 17:22:33 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
>>   Removing unnecessary cast.
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java line 88:
>> 86: 
>> 87:     @Override
>> 88:     protected Content getDeprecatedOrPreviewLink(Element member) {
> This name is a side-effect of the `ElementFlag` question.  We should either use explicit field and method names, or we should use `ElementFlag` more consistently.   This method name works OK for now, but if if ever gets to have another `orFoo` component in the name, the signature should be parameterized with something like `ElementFlag` or its equivalent.

Note this method returns the same link for deprecate or preview - it just was named "getDeprecatedLink", and when using it work preview, I renamed it "getDeprecatedOrPreviewLink". We may need to think of a better name.

> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java line 2980:
>> 2978:     }
>> 2979: 
>> 2980:     public enum DeclarationPreviewLanguageFeatures {
> General thinking aloud question ... how does all this interact with source or release options for an earlier release?

I don't think there should be much interaction with -source <older-version>. We don't support preview features from previous version or preview class files from previous versions, so I think it should be enough to handle the currently present preview features.

> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java line 2984:
>> 2982:         SEALED(List.of("sealed")),
>> 2983:         SEALED_PERMITS(List.of("sealed", "permits")),
>> 2984:         RECORD(List.of("record"));
> I'm guessing this is about to go away soon?

Right, this is likely to go away soon.


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

More information about the compiler-dev mailing list