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.

Bug 122878 - Exception refactoring package
Summary: Exception refactoring package
Status: RESOLVED DUPLICATE of bug 122295
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-27 16:55 UTC by _ tboudreau
Modified: 2008-12-22 11:37 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sources - projects are underneath TopicAuction (7.99 MB, application/x-compressed)
2007-11-27 16:59 UTC, _ tboudreau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2007-11-27 16:55:28 UTC
I encountered the following exception while trying to refactor a package name, when the refactoring was in its data gathering phase.

I had previously refactored a package in a different project that this one depends on.  This worked successfully, but the class metadata cache was clearly 
screwed up - I refactored
org.netbeans.libs.wicketmodels to org.wicketstuff.quickmodels
in the attached project wicket_persistencefacade_models
then I refactored the same package in test sources (shouldn't this be automatic, the way IntelliJ does it?)
then I moved to the attached project persistencefacade and refactored 
org.netbeans.libs.persistencefacade into org.wicketstuff.persistence
and in the data gathering phase the following exception was thrown

Generally package refactoring seems to be pretty unstable.  Build 071115.

java.lang.IllegalArgumentException: All children must have the same parent: Users/tim/space/persistence/TopicAuction/persistencefacade/src/org/
wicketstuff/persistence vs. Users/tim/space/persistence/TopicAuction/persistencefacade/src/org/netbeans/libs/persistencefacade
	at org.openide.filesystems.Ordering.getOrder(Ordering.java:109)
	at org.openide.filesystems.FileUtil.getOrder(FileUtil.java:1604)
	at org.openide.loaders.FolderList.carefullySort(FolderList.java:585)
	at org.openide.loaders.FolderList.createBoth(FolderList.java:827)
	at org.openide.loaders.FolderList.access$700(FolderList.java:74)
	at org.openide.loaders.FolderList$2.run(FolderList.java:366)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 1 _ tboudreau 2007-11-27 16:59:41 UTC
Created attachment 53562 [details]
Sources - projects are underneath TopicAuction
Comment 2 _ tboudreau 2007-11-27 17:03:21 UTC
I was incorrect;  the exception was thrown during the refactoring process.  The result is that the package was renamed, but most dependent sources were not 
updated, so my project is now a complete mess...I have five other packages to rename, but of course with the sources now broken, I have to fix them all 
before renaming another package, which will probably break everything again...
Comment 3 Jan Becicka 2007-11-28 08:56:34 UTC
Reassigning to filesystems for evaluation.
Comment 4 rmatous 2007-11-28 11:30:26 UTC

*** This issue has been marked as a duplicate of 122295 ***