[GREENFOOT-169] change directory name whilst Greenfoot is running throws an exception
If you change the name of the directory Greenfoot has been looking in, whilst it's running, then the following stack trace is produced in the Greenfoot terminal. It still also shows that same folder that it tried to find and does not exist in the Open Scenario dialog.
{noformat} FileSystemView.getShellFolder: f=/home/user/greenfoot java.io.FileNotFoundException at sun.awt.shell.ShellFolder.getShellFolder(ShellFolder.java:208) at javax.swing.filechooser.FileSystemView.getShellFolder(FileSystemView.java:507) at javax.swing.filechooser.FileSystemView.getFiles(FileSystemView.java:431) at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread$1.call(BasicDirectoryModel.java:225) at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread$1.call(BasicDirectoryModel.java:221) at sun.awt.shell.ShellFolderManager$DirectInvoker.invoke(ShellFolderManager.java:207) at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run0(BasicDirectoryModel.java:221) at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run(BasicDirectoryModel.java:216) Exception in thread "Basic L&F File Loading Thread" java.lang.RuntimeException: java.lang.NullPointerException at sun.awt.shell.ShellFolderManager$DirectInvoker.invoke(ShellFolderManager.java:209) at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run0(BasicDirectoryModel.java:221) at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run(BasicDirectoryModel.java:216) Caused by: java.lang.NullPointerException at javax.swing.filechooser.FileSystemView.getFiles(FileSystemView.java:434) at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread$1.call(BasicDirectoryModel.java:225) at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread$1.call(BasicDirectoryModel.java:221) at sun.awt.shell.ShellFolderManager$DirectInvoker.invoke(ShellFolderManager.java:207) ... 2 more {noformat}
Issue metadata
- Issue type: Bug
- Priority: Low
- Fix versions: 2.0