8146393: sun/security/tools/jarsigner/ts.sh failed on OEL Linux 7 with ar_SA Locale
authortidu
Thu, 23 Jun 2016 19:58:58 -0700
changeset 39147 98f41520c884
parent 39146 b77e14fef723
child 39148 7d619f151e36
8146393: sun/security/tools/jarsigner/ts.sh failed on OEL Linux 7 with ar_SA Locale Reviewed-by: weijun Contributed-by: Tim Du <tiantian.du@oracle.com>
jdk/test/sun/security/tools/jarsigner/TimestampCheck.java
--- a/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java	Thu Jun 23 21:44:11 2016 +0000
+++ b/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java	Thu Jun 23 19:58:58 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,6 +39,7 @@
 import java.util.Calendar;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
+import java.util.Locale;
 
 import sun.security.pkcs.ContentInfo;
 import sun.security.pkcs.PKCS7;
@@ -371,7 +372,7 @@
     static void jarsigner(String cmd, int path, boolean expected)
             throws Exception {
         System.err.println("Test " + path);
-        Process p = Runtime.getRuntime().exec(String.format(cmd, path, path));
+        Process p = Runtime.getRuntime().exec(String.format(Locale.ROOT,cmd, path, path));
         BufferedReader reader = new BufferedReader(
                 new InputStreamReader(p.getErrorStream()));
         while (true) {