Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8228897

jdeps throws NPE when analyzing javafx.media that references a non-existent class used to be in JDK

    Details

    • CPU:
      x86_64
    • OS:
      linux

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Linux 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

      openjdk 11.0.4 2019-07-16
      OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.4+11)
      OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.4+11, mixed mode)

      and

      java 11.0.4 2019-07-16 LTS
      Java(TM) SE Runtime Environment 18.9 (build 11.0.4+10-LTS)
      Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.4+10-LTS, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      `jdeps --list-reduced-deps logback-classic-1.2.3.jar` fails with NPE in JDK 11.

      In the original issue JDK-8211887 it is fixed for JDK 12, but JDK 11 is LTS hence must be fixed too.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. take logback-classic-1.2.3.jar from https://repo1.maven.org/maven2/ch/qos/logback/logback-classic/1.2.3/
      2. Run `jdeps --list-reduced-deps logback-classic-1.2.3.jar`
         or
             `jdeps --print-module-deps logback-classic-1.2.3.jar`

      exited with code 1, NPE exception is printed to STDOUT

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      no exception, exit code 0
      ACTUAL -
      exited with code 1, NPE exception is printed to STDOUT

      Exception in thread "main" java.lang.NullPointerException
      at jdk.jdeps/com.sun.tools.jdeps.ModuleGraphBuilder.requiresTransitive(ModuleGraphBuilder.java:124)
      at jdk.jdeps/com.sun.tools.jdeps.ModuleGraphBuilder.buildGraph(ModuleGraphBuilder.java:110)
      at jdk.jdeps/com.sun.tools.jdeps.ModuleGraphBuilder.reduced(ModuleGraphBuilder.java:65)
      at jdk.jdeps/com.sun.tools.jdeps.ModuleExportsAnalyzer.modules(ModuleExportsAnalyzer.java:124)
      at jdk.jdeps/com.sun.tools.jdeps.ModuleExportsAnalyzer.run(ModuleExportsAnalyzer.java:97)
      at jdk.jdeps/com.sun.tools.jdeps.JdepsTask$ListModuleDeps.run(JdepsTask.java:1023)
      at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:560)
      at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:519)
      at jdk.jdeps/com.sun.tools.jdeps.Main.main(Main.java:49)


      CUSTOMER SUBMITTED WORKAROUND :
      Additional info: unpacking and deeper analyzes shows the problem in PackagingDataCalculator.class:
      `unzip logback-classic-1.2.3.jar -d logback-classic/`
      `jdeps --list-reduced-deps logback-classic/ch/qos/logback/classic/spi/PackagingDataCalculator.class`

      https://github.com/qos-ch/logback/blob/v_1.2.3/logback-classic/src/main/java/ch/qos/logback/classic/spi/PackagingDataCalculator.java#L20


      FREQUENCY : always


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: