JDK 12 RFR of JDK-8206085 : Refactor langtools/tools/javac/versions/Versions.java
Jonathan Gibbons
jonathan.gibbons at oracle.com
Tue Jul 3 23:16:48 UTC 2018
On 7/3/18 4:03 PM, joe darcy wrote:
> Hi Maurizio,
>
>
> On 7/3/2018 2:51 AM, Maurizio Cimadamore wrote:
>>
>> Looks good.
>>
>> I believe the test could be further automatized, by adding more logic
>> to the enum. E.g. each constant could define in a string a snippet of
>> code that is unique to that version (and maybe the BASE version would
>> have an empty snippet). That way the sources could be generated
>> programatically - no need to repeat various headers etc. Also, I
>> believe once you go down this path, it could be even possible to have
>> a single checksrc method which takes a couple of version constants,
>> generate the sources for them using the templating strategy described
>> above.
>>
>> E.g. it would be great if all the 'mutable' parts would be contained
>> to the enum declaration - adding enum constants is rather easy,
>> especially when the structure is clearly self-explanatory (as in this
>> case).
>>
>>
>
> Thanks for the review.
>
> Further refactoring for another day; this test has some a long way
> from its earlier days as a shell script!
http://hg.openjdk.java.net/jdk6/jdk6/langtools/file/fde47df50cab/test/tools/javac/versions/check.sh
:-)
>
> Cheers,
>
> -Joe
More information about the compiler-dev
mailing list