Builds fail due to use of preview features & removed arguments

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu Dec 19 23:49:11 UTC 2019


On 12/19/19 3:30 PM, David Holmes wrote:
>>
>> /home/ty/Downloads/jdk-master/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor14.java:30: 
>> warning: [preview] RecordComponentElement is an API that is part of a 
>> preview feature
>> import javax.lang.model.element.RecordComponentElement;
>>                                 ^
>> /home/ty/Downloads/jdk-master/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor14.java:30: 
>> warning: [preview] RecordComponentElement is an API that is part of a 
>> preview feature
>> import javax.lang.model.element.RecordComponentElement;
>>                                 ^
>> error: warnings found and -Werror specified
>
> I think this is more an issue for the language and compiler folk on 
> compiler-dev. I'm not clear on all the rules around use of preview 
> features but it seems to me that if we are using them internally and 
> that generates warnings then we should be suppressing those warnings 
> (@supressedWarning) at those call sites. Though I don't know whether 
> you can suppress a warning for an import statement??
>
> David
> ----- 

This sounds like a bug.   In other analogous situations, we decided not 
to give warnings on imports.

-- Jon




More information about the build-dev mailing list