JDK-8196479 : jdeprscan test TestRelease.java is broken by JDK 11 changes
  • Type: Bug
  • Component: tools
  • Affected Version: 11
  • Priority: P3
  • Status: Resolved
  • Resolution: Cannot Reproduce
  • Submitted: 2018-01-31
  • Updated: 2018-06-21
  • Resolved: 2018-06-21
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.
JDK 11
11Resolved
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Changes to the set of public classes in the JDK seems to break the TestRelease.java test:

{open/test/langtools} / tools/jdeprscan/tests/jdk/jdeprscan/TestRelease.java

If a public class is added to the JDK, say java.util.HitMe:

==========
package java.util;

/**
 * Hit me with your rhythm stick
 */
public class HitMe {
   HitMe hitMeSlowlyHitMeQuick;
}
==========

Then TestRelease.java will fail with messages like the following:

==========
STDERR:
Usage: jdeprscan [options] {dir|jar|class} ...

options:
        --class-path PATH
        --for-removal
        --full-version
  -? -h --help
  -l    --list
        --release 6|7|8|9|10
  -v    --verbose
        --version
warning: unknown enum constant javax.jws.soap.SOAPBinding.Use.LITERAL
warning: unknown enum constant javax.annotation.Resource.AuthenticationType.CONTAINER
warning: unknown enum constant javax.jws.soap.SOAPBinding.Use.LITERAL
warning: unknown enum constant javax.annotation.Resource.AuthenticationType.CONTAINER
warning: unknown enum constant javax.jws.soap.SOAPBinding.Use.LITERAL
warning: Supported source version 'RELEASE_10' from annotation processor 'com.sun.tools.jdeprscan.TraverseProc' less than -source '11'
error: Could not find class file for 'java.util.HitMe'.
java.lang.Exception: failures: 1
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96)
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
	at java.base/java.lang.Thread.run(Thread.java:844)
==========

This probably has something to do with versioning updating and modifications to the compiler's symbol files.
Comments
This error no longer seems to occur. This is possibly related to JDK-8194308 or JDK-8196618. There is otherwise a fair amount of noise in the log file. The usage message is expected, because this test invokes jdeprscan with an illegal option. The annotation processor warning is covered by JDK-8205455. The "unknown enum constant" warnings are covered by JDK-8187155.
21-06-2018

Possibly related to JDK-8194308.
31-01-2018