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

jdeps to handle classes with the same package name in different JARs and correct profile for javax.crypto.*

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • 8
    • tools
    • None
    • b115

    Description

      1) jdeps doesn't handle the same package name being used in more than one JAR files

      $ ./bin/jdeps demo/jfc/Notepad/Notepad.jar demo/jfc/SwingSet2/SwingSet2.jar
      demo/jfc/Notepad/Notepad.jar -> /net/scanas404.us.oracle.com/export/java-re/jdk/8/ea/b113/binaries/solaris-x64/jre/lib/rt.jar
         <unnamed> (Notepad.jar)
            -> java.awt
            ...
      demo/jfc/SwingSet2/SwingSet2.jar -> demo/jfc/Notepad/Notepad.jar
      demo/jfc/SwingSet2/SwingSet2.jar -> /net/scanas404.us.oracle.com/export/java-re/jdk/8/ea/b113/binaries/solaris-x64/jre/lib/rt.jar
         <unnamed> (SwingSet2.jar)
            -> <unnamed> Notepad.jar
            -> java.awt
            ...

      2) javax.crypto.* packages are in compact1 but shown as "JDK internal API".

      jdeps reads ct.sym to determine which packages are which profiles. javax.crypto.* in compact1 but not in rt.jar (they are in jce.jar) and thus they are not included in ct.sym. So dependency on javax.crypto.* APIs is incorrectly shown as JDK internal API.

      ct.sym was designed to work only with rt.jar. Since javac treats jce.jar as in other jars in classpath and javax.crypto.* are in compact1, program using javax.crypto is compiled successfully with -profile compact1. Instead of generating ct.sym to work with multiple jars that would require javac to change too, jdeps will special these APIs in jdeps.

      3) -verbose prints all class dependencies including those within the same JAR file. The summary.dot file should show package-level summary which would be more useful for analysis when -verbose is specified.

      Attachments

        Activity

          People

            mchung Mandy Chung
            mchung Mandy Chung
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: