This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[ BUILD # : 200709200000 ] [ JDK VERSION : 1.6.2 ] In Files dialog, when you rename a file happen to a already exists file name, netbeans pop up a exception window with title of unexpected exception. Obviously, it is an expected exception. Netbeans should give a waring such as cannot rename because of duplicated name. I attached a screen capture.
Created attachment 49415 [details] The unexpected exception error.
What is Files dialog? How do I invoke it? Do you mean main menu File -> Open project or File -> Open file? Please follow guidelines for entering bug reports and attach exact set of steps that leads to an error. Thank you.
Sorry. I mean Files Window, which you can invoke by pressing Ctrl + 2 or Windows --> Files on menu bar. Then you select a file in the Files Window, press F2 to invoke rename function. Third, input an existing file name. For example, I have 2 files in the Files Window, --AAA.java --BBB.java Rename the BBB.java to AAA.java will case the error I mentioned.
Great, now I can reproduce, but only with plain files created through new File -> empty file. In case of java files, rename refactor comes in and it's all OK here. So my steps for reproduction are: 1) Open Files window 2) Create empty file aaa (File -> New file -> Other -> Empty file) 3) Create empty file bbb 4) select bbb, invoke rename (press F2), try to rename to aaa mentioned dialog with exception appear. Strangely, exception don't appear on console nor in the log, it seems to be swallowed. Moreover, exception dialog contains wrong location of log file, it's not in "system" subdir, but "var/log" subdir.
Passing to openide/explorer. Error is in TreeViewCellEditor.editingStopped. IMHO exception is catched here and should be only logged instead of popping the dialog.
The problem is in the presentation of the underlaying exception to the user. It is properly annotated already, and if not, the code would annotate it with a generic message, but the NotifyDescriptor.Exception doesn't use the annotation.
Fixed: openide/explorer/src/org/openide/explorer/view/TreeViewCellEditor.java,v1.5