src/share/classes/javax/swing/filechooser/FileSystemView.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -577,13 +577,11 @@
*/
protected File createFileSystemRoot(File f) {
return new FileSystemRoot(f);
}
-
-
-
+ @SuppressWarnings("serial") // Same-version serialization only
static class FileSystemRoot extends File {
public FileSystemRoot(File f) {
super(f,"");
}
@@ -773,10 +771,11 @@
}
}
return super.createFileObject(path);
}
+ @SuppressWarnings("serial") // anonymous class
protected File createFileSystemRoot(File f) {
// Problem: Removable drives on Windows return false on f.exists()
// Workaround: Override exists() to always return true.
return new FileSystemRoot(f) {
public boolean exists() {