Committed tiny patch that closes bug #13556 where JFileChooser threw a null pointer exception when given an argument that was not a valid file. Instead it should default to the home directory. Patch attached.
2005-07-08 Anthony Balkissoon <[EMAIL PROTECTED]> * javax/swing/filechooser/FileSystemView.java: (getFiles): Added check for non-existent directory, in which case default to home directory. -Tony
Index: javax/swing/filechooser/FileSystemView.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/filechooser/FileSystemView.java,v retrieving revision 1.5 diff -u -r1.5 FileSystemView.java --- javax/swing/filechooser/FileSystemView.java 2 Jul 2005 20:32:50 -0000 1.5 +++ javax/swing/filechooser/FileSystemView.java 8 Jul 2005 15:03:16 -0000 @@ -134,7 +134,7 @@ */ public File[] getFiles(File dir, boolean useFileHiding) { - if (dir == null) + if (dir == null || dir.listFiles() == null) return null; File[] files = dir.listFiles(); if (! useFileHiding)
_______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches