exports lint is perhaps a little overzealous

Remi Forax forax at univ-mlv.fr
Tue May 2 08:41:02 UTC 2017


ping ?

Rémi

----- Mail original -----
> De: "Remi Forax" <forax at univ-mlv.fr>
> À: "compiler-dev" <compiler-dev at openjdk.java.net>
> Envoyé: Lundi 1 Mai 2017 11:46:33
> Objet: Re: exports lint is perhaps a little overzealous

> ping ?
> 
> Rémi
> 
> ----- Mail original -----
>> De: "Remi Forax" <forax at univ-mlv.fr>
>> À: "compiler-dev" <compiler-dev at openjdk.java.net>
>> Envoyé: Vendredi 28 Avril 2017 21:31:31
>> Objet: exports lint is perhaps a little overzealous
> 
>> javac output warnings when an annotation on public methods or a public class of
>> an exported package comes from a dependencies which is not declared as
>> transitive.
>> 
>> I believe that annotations are not really part of the API so should not be
>> checked by exports linter.
>> In my case, the annotation is the JUnit5 @Test, given how JUnit works, the
>> method is always called by reflection so having a requires transitive makes
>> little sense.
>> 
>> 
>> target\test\merged\com.github.forax.pro.api\com\github\forax\pro\api\helper\CmdLineTests.java:9:
>> warning: [exports] class Test in module junit.jupiter.api is not indirectly
>> exported using requires transitive
>>  @Test
>>   ^
>> target\test\merged\com.github.forax.pro.api\com\github\forax\pro\api\helper\CmdLineTests.java:15:
>> warning: [exports] class Test in module junit.jupiter.api is not indirectly
>> exported using requires transitive
>>  @Test
>>   ^
>> target\test\merged\com.github.forax.pro.api\com\github\forax\pro\api\helper\CmdLineTests.java:22:
>> warning: [exports] class Test in module junit.jupiter.api is not indirectly
>> exported using requires transitive
>>  @Test
>>   ^
>> target\test\merged\com.github.forax.pro.helper\com\github\forax\pro\helper\FileHelperTests.java:11:
>> warning: [exports] class Test in module junit.jupiter.api is not indirectly
>> exported using requires transitive
>>  @Test
>>   ^
>> 
>> regards,
> > Rémi


More information about the compiler-dev mailing list