-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
9
-
None
-
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+111)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+111, mixed mode)Debian GNU/Linux 8.3
-
b111
-
linux
With JDK 9-ea b111 some of Apache Derby's regression tests started failing. The reason appears to be that java.util.Collator.getInstance(Locale) does not return the correct Collator when a security manager is installed.
Given the following Java program:
import java.text.Collator;
import java.util.Locale;
public class TestCollator {
public static void main(String[] args) {
Collator c = Collator.getInstance(new Locale("no"));
System.out.println(c.compare("ab", "aa"));
}
}
With JDK 8u72 and with JDK 9-ea b110, the program prints -1 both when a security manager is installed and when one is not installed. This is the expected result.
With JDK 9-ea b111, however, I see the following behaviour:
$ ./b111/jre-9/bin/java TestCollator
-1
$ ./b111/jre-9/bin/java -Djava.security.manager TestCollator
1
Both should have printed -1.
Given the following Java program:
import java.text.Collator;
import java.util.Locale;
public class TestCollator {
public static void main(String[] args) {
Collator c = Collator.getInstance(new Locale("no"));
System.out.println(c.compare("ab", "aa"));
}
}
With JDK 8u72 and with JDK 9-ea b110, the program prints -1 both when a security manager is installed and when one is not installed. This is the expected result.
With JDK 9-ea b111, however, I see the following behaviour:
$ ./b111/jre-9/bin/java TestCollator
-1
$ ./b111/jre-9/bin/java -Djava.security.manager TestCollator
1
Both should have printed -1.
- duplicates
-
JDK-8152817 Locale data loading fails silently when running with a security manager
-
- Closed
-