JDK-8194308 : jdeprscan will need updates to deal with the removal of the Java EE modules
  • Type: Bug
  • Component: tools
  • Affected Version: 11
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-01-02
  • Updated: 2018-07-04
  • Resolved: 2018-06-14
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
11 b19Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
jdeprscan will need to be updated to to be able to run successfully after the Java EE and CORBA modules are deleted. 

The processSelf method adds the java.se.ee and jdk.xml.bind modules:
������������������
    boolean processSelf(Collection<String> classes) throws IOException {
        options.add("--add-modules");
        options.add("java.se.ee,jdk.xml.bind"); // TODO why jdk.xml.bind?

        if (classes.isEmpty()) {
            Path modules = FileSystems.getFileSystem(URI.create("jrt:/"))
                                      .getPath("/modules");

            // names are /modules/<modulename>/pkg/.../Classname.class
            try (Stream<Path> paths = Files.walk(modules)) {
                Stream<String> files =
                    paths.filter(p -> p.getNameCount() > 2)
                         .map(p -> p.subpath(1, p.getNameCount()))
                         .map(Path::toString);
                return doModularFileNames(files);
            }
        } else {
            return doClassNames(classes);
        }
    }
-------------------

The following tests currently fail  due to the removal of the Java EE and CORBA modules:

make run-test TEST="open/test/langtools/tools/jdeprscan/tests/jdk/jdeprscan/TestNotFound.java���
make run-test TEST="open/test/langtools/tools/jdeprscan/tests/jdk/jdeprscan/TestRelease.java"