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.
[nb3.3.1_rc2](20020123), [jdk1.3.1](02) Steps to reproduce: - select TXT file in Explorer - hit F2 -> in place textfield is created - hit Delete and delete name of file(rename to empty string), hit Enter -> node .txt is displayed The same result for renaming by property name in properties window.
Easy, explorer shouldn't allow this. (we're not showing extensions by default and explorer isn't place for management of .something files). This should behave exactly as if you try to put empty string or invalid filename for java classes.
IMHO this should be solved directly by a check in DataObject.rename which could throw an IllegalArgumentException (nicely annotated) if passed "". Unless someone thinks there might be a reason to programmatically rename a DataObject to "" (sounds dangerous to me).
Created attachment 5686 [details] a proposed patch
DataObject check a new name and if it is empty then throw IllegalArgumentException. A question is is the name should be trimmed before check or a name " .txt" is allowed. I'm going to commit a attached patch on 10/5.
the attached patch was commited.
verified in [nb_dev](20020517)
Resolved for 3.4.x or earlier, no new info since then -> closing.