Jigsaw or JDK8 ? <was> Re: Example code in JDK8 requiring change for modular function

Paul Sandoz paul.sandoz at oracle.com
Mon May 14 03:52:56 PDT 2012


Hi,

I thought we might get away with pushing certain platform changes for modularity related to Class/ClassLoader/ServiceLoader to the JDK8 forest but i really don't like the idea of a stub Platform class, and we really need to test such changes in classpath *and* modular mode.

I want to tackle a bunch of ServiceLoader stuff in one commit some of which may require use of Platform (e.g. no caching of service instances in module mode). Therefore i think it best to wait until your web rev is committed and commit to Jigsaw.

Paul.

On May 9, 2012, at 12:51 PM, Paul Sandoz wrote:

> 
> On May 7, 2012, at 6:34 PM, Mandy Chung wrote:
> 
>> On 5/7/2012 1:52 AM, Paul Sandoz wrote:
>>> So this is good example of where we could have two code paths based on a boolean check if running in module mode or not.
>> 
>> 
>> It's good that you start looking into this example and others in JDK that
>> will need to handle across the board.  FYI. I added a few static methods
>> in org.openjdk.jigsaw.Platform, part of the changes I posted [1]:
>> http://cr.openjdk.java.net/~mchung/jigsaw/webrevs/module-class-loading/webrev-jigsaw-ms/src/share/classes/org/openjdk/jigsaw/Platform.java.sdiff.html
>> 
> 
> Thanks.
> 
> To do general changes in JDK8 we will have to provide some of those static methods, say in a class in sun.misc as a temporary solution until Jigsaw is merged back. e.g.
> 
> package sun.misc;
> 
> // This class will be removed after the Jigsaw code base is pushed to JDK8 and classes that depend on this class
> // and its methods will be updated to utilize the equivalent Jigsaw functionality
> public class Platform {
>  public static boolean isModuleMode() { return false; }
> }
> 
> Paul.
> 
>> Mandy
>> 
>> [1] http://mail.openjdk.java.net/pipermail/jigsaw-dev/2012-May/002498.html
>> 
> 




More information about the jigsaw-dev mailing list