Hi, While testing Jump a bit I noticed that you can call getSelectedFiles() even if in single file selection mode. So this patch makes sure getSelectedFiles() does return something in that case.
2005-07-11 Mark Wielaard <[EMAIL PROTECTED]>
* javax/swing/JFileChooser.java (getSelectedFiles): Return an one
element array containing selectedFile if selectedFiles is null.
Several people on irc said that this was better then the current
implementation. So I committed it. I didn't really get much further with
gump though.
Committed,
Mark
--- javax/swing/JFileChooser.java 2 Jul 2005 20:32:47 -0000 1.12
+++ javax/swing/JFileChooser.java 11 Jul 2005 19:44:59 -0000
@@ -357,7 +357,11 @@
*/
public File[] getSelectedFiles()
{
- return selectedFiles;
+ if (selectedFiles != null)
+ return selectedFiles;
+ if (selectedFile != null)
+ return new File[] { selectedFile };
+ return null;
}
/**
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Classpath-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath-patches
