JDK-8187155 : jdeprscan issues spurious "unknown enum constant" warnings
  • Type: Bug
  • Component: tools
  • Affected Version: 11
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2017-09-05
  • Updated: 2018-11-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
Given a class (any class, such as a simple Hello World class) compiled under JDK 8, running "jeprscan --release 8 Hello.class" results in the following warning messages:

warning: unknown enum constant javax.jws.WebParam.Mode.IN
warning: unknown enum constant javax.jws.soap.SOAPBinding.Use.LITERAL
warning: unknown enum constant javax.annotation.Resource.AuthenticationType.CONTAINER

Comments
Running jdeprscan JDK 11 build 19, the following output occurs: $ jdeprscan --release 6 Hello.class warning: unknown enum constant javax.jws.soap.SOAPBinding.Use.LITERAL warning: unknown enum constant javax.annotation.Resource.AuthenticationType.CONTAINER $ jdeprscan --release 7 Hello.class warning: unknown enum constant javax.jws.soap.SOAPBinding.Use.LITERAL warning: unknown enum constant javax.annotation.Resource.AuthenticationType.CONTAINER $ jdeprscan --release 8 Hello.class warning: unknown enum constant javax.jws.soap.SOAPBinding.Use.LITERAL $ jdeprscan --release 9 Hello.class warning: unknown enum constant javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED warning: unknown enum constant javax.annotation.Resource.AuthenticationType.CONTAINER warning: unknown enum constant javax.jws.WebParam.Mode.IN $ jdeprscan --release 10 Hello.class warning: unknown enum constant javax.annotation.Resource.AuthenticationType.CONTAINER warning: unknown enum constant javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED warning: unknown enum constant javax.jws.WebParam.Mode.IN $ jdeprscan Hello.class warning: Supported source version 'RELEASE_10' from annotation processor 'com.sun.tools.jdeprscan.TraverseProc' less than -source '11' (The source version warning is unrelated and has been fixed by JDK-8205455.) I'm not sure this is a problem with jdeprscan. It seems to occur during the loading phase, when jdeprscan is running through the APIs using the symbol data, using LoadProc. But the warning is apparently issued by the compiler task, invoked by jdeprscan, not by jdeprscan itself. It could be that this is a problem with the symbol data itself. The compiler symbol information is stored in make/data/symbols. More investigation needed. Meanwhile, deferring to 12.
27-06-2018

This doesn't have anything to do with the class file being newer than the given release value. This also happens with --release 9 and --release 10 in addition to --release 8, but not with --release 11 (or when --release is omitted).
21-06-2018

Also need to consider what should happen if the class file in question is newer than the given --release value. If Hello.class was compiled under Java 9, for example, it might use Java 9 APIs that don't exist in Java 8. It's unclear what should happen here. A warning is the obvious behavior. But the semantics of doing this are quite odd and maybe jdeprscan shouldn't proceed at all, or it should skip such files.
28-03-2018