Skip to content

Commit

Permalink
8293326: jdk/sun/security/tools/jarsigner/compatibility/SignTwice.jav…
Browse files Browse the repository at this point in the history
…a slow on Windows

Reviewed-by: weijun, wetmore
  • Loading branch information
djelinski committed Sep 7, 2022
1 parent 710a143 commit 205f992
Showing 1 changed file with 10 additions and 3 deletions.
Expand Up @@ -67,6 +67,7 @@
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;
Expand Down Expand Up @@ -1034,13 +1035,19 @@ private static OutputAnalyzer execTool(String toolPath, String... args)
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 {
Expand Down

3 comments on commit 205f992

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on 205f992 Jan 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 205f992 Jan 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin the backport was successfully created on the branch GoeLin-backport-205f992e in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 205f992e from the openjdk/jdk repository.

The commit being backported was authored by Daniel Jeliński on 7 Sep 2022 and was reviewed by Weijun Wang and Bradford Wetmore.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-205f992e:GoeLin-backport-205f992e
$ git checkout GoeLin-backport-205f992e
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-205f992e

Please sign in to comment.