8015351: Nashorn shell does not start with Turkish locale
authorsundar
Fri, 24 May 2013 23:27:52 +0530
changeset 17772 9acc52342786
parent 17771 9fedae4933e4
child 17773 d143427d1d4d
child 17774 0407501fa563
8015351: Nashorn shell does not start with Turkish locale Reviewed-by: jlaskey
nashorn/make/project.properties
nashorn/src/jdk/nashorn/internal/runtime/options/OptionTemplate.java
--- a/nashorn/make/project.properties	Fri May 24 18:39:25 2013 +0530
+++ b/nashorn/make/project.properties	Fri May 24 23:27:52 2013 +0530
@@ -214,9 +214,13 @@
 run.test.xmx=3G
 run.test.xms=2G
 
+run.test.user.language=tr
+run.test.user.country=TR
+
 #  -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintNMethods
 # add '-Dtest.js.outofprocess' to run each test in a new sub-process
-run.test.jvmargs.main=-server -Xmx${run.test.xmx} -XX:+TieredCompilation -ea -Dfile.encoding=UTF-8
+run.test.jvmargs.main=-server -Xmx${run.test.xmx} -XX:+TieredCompilation -ea -Dfile.encoding=UTF-8 -Duser.language=${run.test.user.language} -Duser.country=${run.test.user.country}
+
 #-XX:+HeapDumpOnOutOfMemoryError -XX:-UseCompressedKlassPointers -XX:+PrintHeapAtGC -XX:ClassMetaspaceSize=300M  
 run.test.jvmargs.octane.main=-Xms${run.test.xms} ${run.test.jvmargs.main}
 
--- a/nashorn/src/jdk/nashorn/internal/runtime/options/OptionTemplate.java	Fri May 24 18:39:25 2013 +0530
+++ b/nashorn/src/jdk/nashorn/internal/runtime/options/OptionTemplate.java	Fri May 24 23:27:52 2013 +0530
@@ -25,6 +25,7 @@
 
 package jdk.nashorn.internal.runtime.options;
 
+import java.util.Locale;
 import java.util.TimeZone;
 import jdk.nashorn.internal.runtime.QuotedStringTokenizer;
 
@@ -263,7 +264,7 @@
                     this.params = arg;
                     break;
                 case "type":
-                    this.type = arg.toLowerCase();
+                    this.type = arg.toLowerCase(Locale.ROOT);
                     break;
                 case "default":
                     this.defaultValue = arg;