Review Request for 8027481: jdeps to handle classes with the same package name ...

Mandy Chung mandy.chung at oracle.com
Tue Oct 29 19:30:03 UTC 2013


Webrev at:
http://cr.openjdk.java.net/~mchung/jdk8/webrevs/8027481/webrev.00/

https://bugs.openjdk.java.net/browse/JDK-8027481

This patch fixes a couple of small jdeps issues:

1) jdeps doesn't handle the same package name being used in more than 
one JAR files.  It currently incorrectly shows the dependencies for 
example if two JAR files have classes in the unnamed package.

The fix is to change the Analyzer class to maintain the target name 
together the Archive where the dependence comes from (the new 
ArchiveDeps.Dep class in this patch).

2) javax.crypto.* packages are in compact1 but shown as "JDK internal 
API" because they are not in rt.jar and thus not included in ct.sym.  
The simple fix is to special it in jdeps rather than changing ct.sym to 
work with multiple jars (which will impact javac)

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

I also added an experimental option to label the edges in the 
summary.dot with the dependencies to make it easier to view the graph. 
It's useful when it has managable amount of dependencies displayed in 
the graph and not sure how well the dot tool can render. So I keep it 
experimental for now.

thanks
Mandy



More information about the core-libs-dev mailing list