A bug in filesystem bootstrap (unix/ linux) prevents (original) (raw)
Dawid Weiss dawid.weiss at gmail.com
Wed Jul 4 12:43:52 UTC 2012
- Previous message: hg: jdk8/tl/jdk: 7180038: regression test failure, SSLEngineBadBufferArrayAccess.java
- Next message: A bug in filesystem bootstrap (unix/ linux) prevents
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi folks.
Run the following with -Dfile.encoding=UTF-16:
public class TestBlah { public static void main(String []) throws Exception { TimeZone.getDefault(); } }
This on linux (and any unixish system I think) will result in:
java.lang.ExceptionInInitializerError at java.nio.file.FileSystems.getDefault(FileSystems.java:176) at sun.util.calendar.ZoneInfoFile$1.run(ZoneInfoFile.java:482) at sun.util.calendar.ZoneInfoFile$1.run(ZoneInfoFile.java:477) ...
There is an encoding-sensitive part calling getBytes on the initial path (and this screws it up):
// package-private
UnixFileSystem(UnixFileSystemProvider provider, String dir) {
this.provider = provider;
this.defaultDirectory = UnixPath.normalizeAndCheck(dir).getBytes();
if (this.defaultDirectory[0] != '/') {
throw new RuntimeException("default directory must be absolute");
}
Filed a bug for this but don't have the ID yet.
Dawid
- Previous message: hg: jdk8/tl/jdk: 7180038: regression test failure, SSLEngineBadBufferArrayAccess.java
- Next message: A bug in filesystem bootstrap (unix/ linux) prevents
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]