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.
It happened to me by accident, but it is easily reproducible: - start NB35 release - open a java file (eg. ColorPreview.java) - insert some random character (eg. "a") at *first* position on *first* line in the file - in explorer rename node of this java file to some diff name After this I'm experiencing endless renaming loop: file is renamed, class and constructor are renamed; rename operation is reverted; file is renamed, .... Issue itself is harmless: IDE can be exited, file can be saved. Still I think it is P2 and can have some nasty sideeffects.
I can reproduce it. Should be fixed for 4.0
On Solaris this seems to work "fine".
Under some condition (do not know which; maybe guarded blocks) the rename/revert cycle is enhanced with third step: add package statement. The file then keeps growing and growing.
if we create error before package declaration, parser calls org.netbeans.modules.java.model.SourceElementImpl setPackage(...), sets packageId to null and causes additional events, renaming of the file attempts to set correct package with some events and we get endless loop... Variant of fix - to not allow parser to set packageId to null
Created attachment 11685 [details] variant of fix
Tomasi, can you review this patch? Thanks
The patch should be ok.
In that case, we can apply it, right?
Fixed in Nevada Patch 1 and in Arrow.
Fixed in the trunk. /cvs/java/src/org/netbeans/modules/java/parser/SourceInfo.java new revision: 1.8; previous revision: 1.7
Verified in 200402181900.