--- old/make/java/java/Exportedfiles.gmk 2012-10-25 14:06:36.322460534 -0700 +++ new/make/java/java/Exportedfiles.gmk 2012-10-25 14:06:36.206460536 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, 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 @@ -66,6 +66,7 @@ java/util/prefs/FileSystemPreferences.java \ java/io/Console.java \ java/io/FileDescriptor.java \ + java/io/DefaultFileSystem.java \ java/io/InputStream.java \ java/io/FileInputStream.java \ java/io/FileOutputStream.java \ @@ -142,6 +143,7 @@ java/io/Console.java \ java/io/FileSystem.java \ java/io/FileDescriptor.java \ + java/io/DefaultFileSystem.java \ java/io/InputStream.java \ java/io/FileInputStream.java \ java/io/FileOutputStream.java \ --- old/make/java/java/FILES_c.gmk 2012-10-25 14:06:36.854460526 -0700 +++ new/make/java/java/FILES_c.gmk 2012-10-25 14:06:36.742460527 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1996, 2012, 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 @@ -32,7 +32,6 @@ Compiler.c \ Console_md.c \ Double.c \ - FileSystem_md.c \ FileDescriptor_md.c \ FileInputStream.c \ FileInputStream_md.c \ --- old/make/java/java/FILES_java.gmk 2012-10-25 14:06:37.382460516 -0700 +++ new/make/java/java/FILES_java.gmk 2012-10-25 14:06:37.262460518 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1996, 2012, 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 @@ -438,6 +438,7 @@ java/io/File.java \ java/io/FileSystem.java \ java/io/FileDescriptor.java \ + java/io/DefaultFileSystem.java \ java/io/FilenameFilter.java \ java/io/FileFilter.java \ java/io/FilePermission.java \ --- old/make/java/java/mapfile-vers 2012-10-25 14:06:37.914460508 -0700 +++ new/make/java/java/mapfile-vers 2012-10-25 14:06:37.802460510 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, 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 @@ -87,7 +87,6 @@ Java_java_io_FileOutputStream_open; Java_java_io_FileOutputStream_write; Java_java_io_FileOutputStream_writeBytes; - Java_java_io_FileSystem_getFileSystem; Java_java_io_ObjectInputStream_bytesToDoubles; Java_java_io_ObjectInputStream_bytesToFloats; Java_java_io_ObjectOutputStream_doublesToBytes; --- old/makefiles/CompileJavaClasses.gmk 2012-10-25 14:06:38.410460500 -0700 +++ new/makefiles/CompileJavaClasses.gmk 2012-10-25 14:06:38.290460502 -0700 @@ -312,7 +312,8 @@ JDK_BASE_HEADER_CLASSES:=java.lang.Integer \ java.lang.Long \ java.net.SocketOptions \ - sun.nio.ch.IOStatus + sun.nio.ch.IOStatus \ + java.io.FileSystem JDK_BASE_HEADER_JAVA_FILES:=$(patsubst %,$(JDK_TOPDIR)/src/share/classes/%.java,\ $(subst .,/,$(JDK_BASE_HEADER_CLASSES))) --- old/makefiles/mapfiles/libjava/mapfile-vers 2012-10-25 14:06:38.898460491 -0700 +++ new/makefiles/mapfiles/libjava/mapfile-vers 2012-10-25 14:06:38.778460494 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, 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 @@ -87,7 +87,6 @@ Java_java_io_FileOutputStream_open; Java_java_io_FileOutputStream_write; Java_java_io_FileOutputStream_writeBytes; - Java_java_io_FileSystem_getFileSystem; Java_java_io_ObjectInputStream_bytesToDoubles; Java_java_io_ObjectInputStream_bytesToFloats; Java_java_io_ObjectOutputStream_doublesToBytes; --- old/src/share/classes/java/io/File.java 2012-10-25 14:06:39.446460483 -0700 +++ new/src/share/classes/java/io/File.java 2012-10-25 14:06:39.314460485 -0700 @@ -153,7 +153,7 @@ /** * The FileSystem object representing the platform's local file system. */ - private static final FileSystem fs = FileSystem.getFileSystem(); + private static final FileSystem fs = DefaultFileSystem.getFileSystem(); /** * This abstract pathname's normalized pathname string. A normalized --- old/src/share/classes/java/io/FileSystem.java 2012-10-25 14:06:40.026460474 -0700 +++ new/src/share/classes/java/io/FileSystem.java 2012-10-25 14:06:39.894460476 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2012, 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 @@ -32,13 +32,6 @@ abstract class FileSystem { - /** - * Return the FileSystem object representing this platform's local - * filesystem. - */ - public static native FileSystem getFileSystem(); - - /* -- Normalization and construction -- */ /** --- old/src/solaris/native/java/io/FileSystem_md.c 2012-10-25 14:06:40.498460465 -0700 +++ /dev/null 2012-10-25 10:01:49.478698644 -0700 @@ -1,35 +0,0 @@ -/* - * Copyright (c) 1998, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -#include "jni.h" -#include "jni_util.h" -#include "java_io_FileSystem.h" - - -JNIEXPORT jobject JNICALL -Java_java_io_FileSystem_getFileSystem(JNIEnv *env, jclass ignored) -{ - return JNU_NewObjectByName(env, "java/io/UnixFileSystem", "()V"); -} --- old/src/windows/native/java/io/FileSystem_md.c 2012-10-25 14:06:40.866460459 -0700 +++ /dev/null 2012-10-25 10:01:49.478698644 -0700 @@ -1,34 +0,0 @@ -/* - * Copyright (c) 1998, 2012, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -#include -#include "jni.h" -#include "jni_util.h" - -JNIEXPORT jobject JNICALL -Java_java_io_FileSystem_getFileSystem(JNIEnv *env, jclass ignored) -{ - return JNU_NewObjectByName(env, "java/io/WinNTFileSystem", "()V"); -} --- /dev/null 2012-10-25 10:01:49.478698644 -0700 +++ new/src/solaris/classes/java/io/DefaultFileSystem.java 2012-10-25 14:06:41.042460457 -0700 @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2012, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package java.io; + +/** + * + * @since 1.8 + */ +class DefaultFileSystem { + + /** + * Return the FileSystem object for Unix-based platform. + */ + public static FileSystem getFileSystem() { + return new UnixFileSystem(); + } +} --- /dev/null 2012-10-25 10:01:49.478698644 -0700 +++ new/src/windows/classes/java/io/DefaultFileSystem.java 2012-10-25 14:06:41.410460451 -0700 @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2012, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package java.io; + +/** + * + * @since 1.8 + */ +class DefaultFileSystem { + + /** + * Return the FileSystem object for Windows platform. + */ + public static FileSystem getFileSystem() { + return new WinNTFileSystem(); + } +}