mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-11 14:11:36 +00:00
8167328: jar -d m.jar hangs
Reviewed-by: alanb, mchung, chegar
This commit is contained in:
parent
a785d65035
commit
689077a9da
@ -774,6 +774,12 @@ class Main {
|
||||
/* parse file arguments */
|
||||
int n = args.length - count;
|
||||
if (n > 0) {
|
||||
if (printModuleDescriptor) {
|
||||
// "--print-module-descriptor/-d" does not require file argument(s)
|
||||
error(formatMsg("error.bad.dflag", args[count]));
|
||||
usageError();
|
||||
return false;
|
||||
}
|
||||
int version = BASE_VERSION;
|
||||
int k = 0;
|
||||
String[] nameBuf = new String[n];
|
||||
|
||||
@ -44,6 +44,8 @@ error.bad.uflag=\
|
||||
error.bad.eflag=\
|
||||
'e' flag and manifest with the 'Main-Class' attribute cannot be specified \n\
|
||||
together!
|
||||
error.bad.dflag=\
|
||||
'-d, --print-module-descriptor' option requires no input file(s) to be specified: {0}
|
||||
error.nosuch.fileordir=\
|
||||
{0} : no such file or directory
|
||||
error.write.file=\
|
||||
|
||||
@ -46,6 +46,7 @@ import static java.lang.System.out;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8167328
|
||||
* @library /lib/testlibrary
|
||||
* @modules jdk.compiler
|
||||
* jdk.jartool
|
||||
@ -756,6 +757,14 @@ public class Basic {
|
||||
"Expected to find ", FOO.moduleName + "@" + FOO.version,
|
||||
" in [", r.output, "]")
|
||||
);
|
||||
|
||||
jar(option,
|
||||
"--file=" + modularJar.toString(),
|
||||
modularJar.toString())
|
||||
.assertFailure();
|
||||
|
||||
jar(option, modularJar.toString())
|
||||
.assertFailure();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user