RFR (small): Modularizer should scan whole classpath for services

Paul Sandoz paul.sandoz at oracle.com
Fri Jul 20 05:10:19 PDT 2012


Hi Chris,

Looks OK to me.

Paul.


On Jul 20, 2012, at 1:13 PM, Chris Hegarty wrote:

> 
> There is a small issue in the Modularizer where some META-INF/service/XXX files are not being correctly copied to the on disk "exploded" modules ( these are used to create the jmod/deb packages ) during the build.
> 
> The issue is that service providers can be in multiple files/jars in the classpath. For example, there are two META-INF/service/com.sun.jdi.connect.Connector files, one in sa-jdi.jar (for the serviceability agent) and one in tools.jar. It is important to preserve these META-INF files in the jmod/installed modules as they are still used to find services in classpath mode (they do not effect module mode).
> 
> The above example, com.sun.jdi.connect.Connector, is the only instance of this situation in the JDK that I can find, but I think it is a general problem so I have changed the Modularizer to search the whole classpath when looking for services rather exiting early once one is found. The META-INF/service/XXX are files are then concatenated.
> 
> http://cr.openjdk.java.net/~chegar/jigsaw/sajdi_webrev.00/webrev/
> 
> Note:
> This issue was noticed when running the com/sun/jdi tests and manifests itself as follows:
>  "java.lang.IllegalArgumentException: No connector named:
>    com.sun.jdi.CommandLineLaunch"
> 
> Thanks,
> -Chris.
> 
> 
> 




More information about the jigsaw-dev mailing list