Re: RFR: 8153652 Update javap to be multi-release jar aware

2016-06-14 Thread Alan Bateman



On 14/06/2016 18:16, Steve Drach wrote:
Please review the following changeset that simply supplies the help 
information for the already existing javap command line option, 
-multi-release.


webrev: http://cr.openjdk.java.net/~sdrach/8153652/webrev.00/ 
 
>
issue: https://bugs.openjdk.java.net/browse/JDK-8153652 



It turns out that javap forwards unrecognized command line options 
to the JavaFileManager for processing.  One such option is 
-multi-release. The value that the -multi-release option is set to 
is used by JavaFileManager to open multi-release jar files so that 
the appropriate versioned view is presented to the client, javap in 
this case.  All this changeset does is add a help message describing 
the existing -multi-release command line option.


The values that can be assigned to this option, and the 
corresponding multi-release modes that the jar file is configured 
for are:


9 -> JarFile.Release.VERSION_9
runtime   -> JarFile.Release.RUNTIME
all others -> JarFile.Release.BASE

If the option is not present, the jar file mode is JarFile.Release.Base.

Is -multi-release the agreed option? Just curious as I would have 
expected -multirelease. If GNU style then it would be --multi-release 
of course.


-multi-release is the option defined in javac options
Is that in JDK 9 yet? It doesn't seem consistent with options like 
-processor path, -modulepath, and other multi-word options. Also if were 
to add GNU style then it might mean -multi-release and --multi-release.


-Alan


Re: RFR: 8153652 Update javap to be multi-release jar aware

2016-06-14 Thread Steve Drach
>> Please review the following changeset that simply supplies the help 
>> information for the already existing javap command line option, 
>> -multi-release.
>> 
>> webrev: http://cr.openjdk.java.net/~sdrach/8153652/webrev.00/ 
>> 
>> issue: https://bugs.openjdk.java.net/browse/JDK-8153652 
>> 
>> 
>> It turns out that javap forwards unrecognized command line options to the 
>> JavaFileManager for processing.  One such option is -multi-release. The 
>> value that the -multi-release option is set to is used by JavaFileManager to 
>> open multi-release jar files so that the appropriate versioned view is 
>> presented to the client, javap in this case.  All this changeset does is add 
>> a help message describing the existing -multi-release command line option.
>> 
>> The values that can be assigned to this option, and the corresponding 
>> multi-release modes that the jar file is configured for are:
>> 
>> 9 -> JarFile.Release.VERSION_9
>> runtime   -> JarFile.Release.RUNTIME
>> all others -> JarFile.Release.BASE
>> 
>> If the option is not present, the jar file mode is JarFile.Release.Base.
>> 
> Is -multi-release the agreed option? Just curious as I would have expected 
> -multirelease. If GNU style then it would be --multi-release of course.

-multi-release is the option defined in javac options

Re: RFR: 8153652 Update javap to be multi-release jar aware

2016-06-14 Thread Alan Bateman

On 13/06/2016 18:24, Steve Drach wrote:


Hi,

Please review the following changeset that simply supplies the help information 
for the already existing javap command line option, -multi-release.

webrev: http://cr.openjdk.java.net/~sdrach/8153652/webrev.00/ 

issue: https://bugs.openjdk.java.net/browse/JDK-8153652 


It turns out that javap forwards unrecognized command line options to the 
JavaFileManager for processing.  One such option is -multi-release.  The value 
that the -multi-release option is set to is used by JavaFileManager to open 
multi-release jar files so that the appropriate versioned view is presented to 
the client, javap in this case.  All this changeset does is add a help message 
describing the existing -multi-release command line option.

The values that can be assigned to this option, and the corresponding 
multi-release modes that the jar file is configured for are:

9 -> JarFile.Release.VERSION_9
runtime   -> JarFile.Release.RUNTIME
all others -> JarFile.Release.BASE

If the option is not present, the jar file mode is JarFile.Release.Base.

Is -multi-release the agreed option? Just curious as I would have 
expected -multirelease. If GNU style then it would be --multi-release of 
course.


-Alan.


Re: RFR: 8153652 Update javap to be multi-release jar aware

2016-06-14 Thread Paul Sandoz

> On 13 Jun 2016, at 10:24, Steve Drach  wrote:
> 
> Hi,
> 
> Please review the following changeset that simply supplies the help 
> information for the already existing javap command line option, 
> -multi-release.
> 
> webrev: http://cr.openjdk.java.net/~sdrach/8153652/webrev.00/ 
> 
> issue: https://bugs.openjdk.java.net/browse/JDK-8153652 
> 
> 
> It turns out that javap forwards unrecognized command line options to the 
> JavaFileManager for processing.  One such option is -multi-release.  The 
> value that the -multi-release option is set to is used by JavaFileManager to 
> open multi-release jar files so that the appropriate versioned view is 
> presented to the client, javap in this case.  All this changeset does is add 
> a help message describing the existing -multi-release command line option.
> 
> The values that can be assigned to this option, and the corresponding 
> multi-release modes that the jar file is configured for are:
> 
> 9 -> JarFile.Release.VERSION_9
> runtime   -> JarFile.Release.RUNTIME
> all others -> JarFile.Release.BASE
> 
> If the option is not present, the jar file mode is JarFile.Release.Base.
> 

Code change looks ok to me.

+main.opt.multi-release=\
+\  -multi-release  Specify the release value for multi-release jar 
files.\n\
+\   The release value is either "runtime" or an 
integer greater\n\
+\   than or equal to 9.  When specified, javap will 
look for class\n\
+\   files in the corresponding versioned directory of 
the jar file.

I am not sure what language you are consistently using but perhaps consider:

  "Specify the Java platform release version for multi-release jar files….” ?

as that might be more descriptive.

I think you will also need a CCC for the new option.

I guess any documentation can be followed up later on (e.g. man pages?), but i 
am not sure how to follow up on that.

Paul.


RFR: 8153652 Update javap to be multi-release jar aware

2016-06-13 Thread Steve Drach
Hi,

Please review the following changeset that simply supplies the help information 
for the already existing javap command line option, -multi-release.

webrev: http://cr.openjdk.java.net/~sdrach/8153652/webrev.00/ 

issue: https://bugs.openjdk.java.net/browse/JDK-8153652 


It turns out that javap forwards unrecognized command line options to the 
JavaFileManager for processing.  One such option is -multi-release.  The value 
that the -multi-release option is set to is used by JavaFileManager to open 
multi-release jar files so that the appropriate versioned view is presented to 
the client, javap in this case.  All this changeset does is add a help message 
describing the existing -multi-release command line option. 

The values that can be assigned to this option, and the corresponding 
multi-release modes that the jar file is configured for are:

9 -> JarFile.Release.VERSION_9
runtime   -> JarFile.Release.RUNTIME
all others -> JarFile.Release.BASE

If the option is not present, the jar file mode is JarFile.Release.Base.

Thanks,
Steve