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.
To reproduce: * create a new "Java Application" project * create an "Empty File" named "fmt.ser" * right-click the file in the "Projects" view & do "Rename..." * enter "abc" & click OK => the file wasn't renamed, but its Properties show "abc" as its name & doing "Rename..." again shows you "abc" as well
Reproduced with: Product Version: NetBeans IDE Dev (Build 201507040001) Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b15 System: Windows 8 version 6.2 running on amd64; UTF-8; pl_PL (nb)
The problem is that extension .ser is used for "instance" files used by the IDE, so InstanceDataObject is created for them and filesystem operations have some special implementation. We could modify InstanceLoader to load only .ser files located in system filesystem, it seems that they are not used otherwise in the IDE. This is an incompatible change, which should be carefully tested, and should be configurable via branding so that platform applications are not affected. Thank you for reporting.
Created attachment 154767 [details] Sketch of the fix (Pending possibility to configure the behavior.)
Workaround to rename file "a.ser" to "b.ser": - Right-click "a.ser", select "Properties", change Extension to "txt" and click "Close" - Right-click "a.txt", select "Rename...", enter "b.ser" and click "OK" - Right-click "b.ser", select "Properties", change Name to "b" and click "Close" (this is not necessary, the underlying file is already renamed, but it can be confusing in some views)
Created attachment 156840 [details] Possible Fix Patch with support for a property that can switch to original behavior, and updated tests that need to set this property.