mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-21 07:45:11 +00:00
8293326: jdk/sun/security/tools/jarsigner/compatibility/SignTwice.java slow on Windows
Reviewed-by: weijun, wetmore
This commit is contained in:
parent
710a143473
commit
205f992e9e
@ -67,6 +67,7 @@ import java.util.jar.Manifest;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import jdk.test.lib.Platform;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.test.lib.util.JarUtils;
|
||||
@ -1034,13 +1035,19 @@ public class Compatibility {
|
||||
throws Throwable {
|
||||
long start = System.currentTimeMillis();
|
||||
try {
|
||||
String[] cmd;
|
||||
if (Platform.isWindows()) {
|
||||
cmd = new String[args.length + 3];
|
||||
System.arraycopy(args, 0, cmd, 3, args.length);
|
||||
} else {
|
||||
cmd = new String[args.length + 4];
|
||||
cmd[3] = "-J-Djava.security.egd=file:/dev/./urandom";
|
||||
System.arraycopy(args, 0, cmd, 4, args.length);
|
||||
}
|
||||
|
||||
String[] cmd = new String[args.length + 4];
|
||||
cmd[0] = toolPath;
|
||||
cmd[1] = "-J-Duser.language=en";
|
||||
cmd[2] = "-J-Duser.country=US";
|
||||
cmd[3] = "-J-Djava.security.egd=file:/dev/./urandom";
|
||||
System.arraycopy(args, 0, cmd, 4, args.length);
|
||||
return ProcessTools.executeCommand(cmd);
|
||||
|
||||
} finally {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user