RFR [9] 8166568 & 8169492 jmod extract and bug fix
Chris Hegarty
chris.hegarty at oracle.com
Thu Dec 8 16:00:34 UTC 2016
> On 8 Dec 2016, at 14:45, Andrey Nazarov <andrey.x.nazarov at oracle.com> wrote:
>
> Hi,
>
> Still no tests when directory where files are extracted is not empty. It very common case.
Consider this patch added:
diff --git a/test/tools/jmod/JmodTest.java b/test/tools/jmod/JmodTest.java
--- a/test/tools/jmod/JmodTest.java
+++ b/test/tools/jmod/JmodTest.java
@@ -177,6 +177,11 @@
jmod("extract",
"--dir", "extractTestDir",
MODS_DIR.resolve("fooExtractDir.jmod").toString())
+ .assertSuccess();
+
+ jmod("extract",
+ "--dir", "extractTestDir",
+ MODS_DIR.resolve("fooExtractDir.jmod").toString())
.assertSuccess()
.resultChecker(r -> {
// check a sample of the extracted files
When the dir is not empty, it just overwrites / adds.
-Chris.
> —Andrey
>> On 8 Dec 2016, at 16:09, Chris Hegarty <chris.hegarty at oracle.com> wrote:
>>
>>
>>> On 8 Dec 2016, at 00:44, Mandy Chung <mandy.chung at oracle.com> wrote:
>>>
>>>
>>>> On Dec 6, 2016, at 2:46 AM, Chris Hegarty <chris.hegarty at oracle.com> wrote:
>>>>
>>>> This change adds a basic option to the jmod tool to extract all its contents to
>>>> the current working directory, 8166568 [1]. Additionally, there is a bug fix for
>>>> a public mutable static, 8169492 [2].
>>>>
>>>> http://cr.openjdk.java.net/~chegar/8166568_8169492.00/
>>>
>>>
>>> Looks good. I agree with Alan and it’d be good to take the destination directory to which the contents are written. FYI. jimage extract command takes —-dir option.
>>
>> Updated webrev contain a target destination dir:
>> http://cr.openjdk.java.net/~chegar/8166568_8169492.01/
>>
>> -Chris
>>
>
More information about the jigsaw-dev
mailing list