JDK 12 RFR of JDK-802856: Remove javac support for 6/1.6 source and target values

Remi Forax forax at univ-mlv.fr
Sun Jul 8 18:42:34 UTC 2018

Hi Stephen,

----- Mail original -----
> De: "Stephen Colebourne" <scolebourne at joda.org>
> À: "compiler-dev" <compiler-dev at openjdk.java.net>
> Envoyé: Dimanche 8 Juillet 2018 19:18:17
> Objet: Re: JDK 12 RFR of JDK-802856: Remove javac support for 6/1.6 source and target values

> While sad to see Java 6 go, I think JDK 12 is the right time, so +1
> for the basic idea of the change here.
> thanks

i know that you know but Java 6 is not dead yet, Azul Zulu [1] still offer free download of the OpenJDK 6, and i'm sure other companies still offer paying support for 6,
what is removed is the support of the target 6 in JDK 12 compiler.

> Stephen


[1] https://www.azul.com/downloads/zulu/zulu-linux/

> On 8 July 2018 at 18:01, joe darcy <joe.darcy at oracle.com> wrote:
>> Hello,
>> Please review the initial implementation of
>>     JDK-802856: Remove javac support for 6/1.6 source and target values
>>     http://cr.openjdk.java.net/~darcy/8028563.4/
>> and the accompanying CSR:
>>     https://bugs.openjdk.java.net/browse/JDK-8206877
>> I suspect at least one adjustment of the changeset will be needed, as
>> discussed below.
>> All the langtools tests pass with these changes.
>> A few comments about the current state of the patch:
>> Updating the various components of the compiler was in part revisiting and
>> then retiring some of the detailed engineering done for Project Coin, such
>> as giving distinct error messages about a try statement lacking other pieces
>> dependent on whether or not try-with-resources is supported under the source
>> version in effect.
>> The refactoring in Source.java to use the Feature enum was easy to work
>> with. Excising the now conceptually dead code and checks was
>> straightforward. The enum constant for DIAMOND was *not* removed, although
>> it is also semantically unconditionally true now just like the other
>> introduced-in-7 features, because messages about diamond from
>> checkSourceLevel called in the parser are used in the testing  of
>> diagnostics generated for the preview feature functionality. I didn't dig
>> down to try to determine the full set of interactions here. There is also
>> support for the diamond finder elsewhere in the compiler. I think it would
>> be acceptable to leave DIAMOND available as a enum constant if there are
>> other uses for it.
>> While an earlier changeset cleared out uses of -source 6 and -target 6
>> (JDK-8206439), various other tests needed updating since -source 7 is now
>> obsolete. This was often handled by adding "-lint:-options" to the compile
>> invocation. I'll file a follow-up issue to add "-lint:-options" to a handful
>> of uses of -source 8 to avoid similar edits being needed in the future.
>> For expediency, I ignored the warning in make/data/symbols/symbols that
>> remove support for --release 6. This aspect of the change should be redone
>> properly, but I thought it would be quicker to ask about this point during
>> the code review than investigate how this aspect of the build works. Once
>> the proper way is determined, I'll send a note to build-dev for a review of
>> that aspect of the change.
>> Thanks,
>> -Joe

More information about the compiler-dev mailing list