RFR: 8244146: javac changes for JEP 306

Joe Darcy joe.darcy at oracle.com
Wed May 5 18:14:24 UTC 2021


On 5/5/2021 1:15 AM, Srikanth Adayapalam wrote:
> On Sat, 1 May 2021 23:00:05 GMT, Joe Darcy <darcy at openjdk.org> wrote:
>
>> 8244146: javac changes for JEP 306
> Overall, looks good other than the various minor issues called out.
>
> I wonder if the tests would have turned out to be a good bit simpler if we simply checked diagnostics against a golden file and skipped the toolbox approach. Is there a strong benefit to using the toolbox approach for the present need ??


I've certainly written golden file tests before, but my understanding 
was that approach was  considered out of favor for new work. While there 
are different kinds of overheads for both approaches, I do like the 
all-in-one-file aspect of the toolbox.


>
> Also, another model for tests could have been test/langtools/tools/javac//7166455/CheckACC_STRICTFlagOnclinitTest.java
> rather than using an annotation processor.
>
> (Not asking for a change, just an academic question/observation)

Having worked on annotation processors, I reach for that tool more often 
than others might :-)

>
> -------------
>
> PR: https://git.openjdk.java.net/jdk/pull/3831


More information about the compiler-dev mailing list