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 197437 - IllegalArgumentException: Not a DataFolder: vk155633@endif:22:/export/home4/vk155633/LINK-TO-SSSIDE-VK/test-code/test_io_net (was a org.netbeans.modules.cnd.source.CDataObject) (file is folder? true)
Summary: IllegalArgumentException: Not a DataFolder: vk155633@endif:22:/export/home4/v...
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Remote (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-05 12:41 UTC by Vladimir Kvashin
Modified: 2011-06-02 09:05 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 175147


Attachments
stacktrace (1.89 KB, text/plain)
2011-04-05 12:42 UTC, Vladimir Kvashin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2011-04-05 12:41:58 UTC
This bug was originally marked as duplicate of bug 150018, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 20110404-42f556074587)
VM: Java HotSpot(TM) Server VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03
OS: SunOS

User Comments:
vkvashin: Iimported a remote project from a directory that has a symbolic link as its part




Stacktrace: 
java.lang.IllegalArgumentException: Not a DataFolder: vk155633@endif:22:/export/home4/vk155633/LINK-TO-SSSIDE-VK/test-code/test_io_net (was a org.netbeans.modules.cnd.source.CDataObject) (file is folder? true)
   at org.openide.loaders.DataFolder.findFolder(DataFolder.java:545)
   at org.netbeans.modules.project.ui.PhysicalView.createNodesForProject(PhysicalView.java:161)
   at org.netbeans.modules.project.ui.ProjectsRootNode$ProjectChildren.createNodes(ProjectsRootNode.java:295)
   at org.netbeans.modules.project.ui.ProjectsRootNode$ProjectChildren.createNodes(ProjectsRootNode.java:243)
   at org.openide.nodes.Children$Keys$KE.nodes(Children.java:1648)
   at org.openide.nodes.ChildrenArray.nodesFor(ChildrenArray.java:149)
Comment 1 Vladimir Kvashin 2011-04-05 12:42:02 UTC
Created attachment 107506 [details]
stacktrace
Comment 2 Vladimir Kvashin 2011-04-05 13:14:55 UTC
The issue is in wrong equals() method:
according to the debugger,
the following two file objects return equals() == true
vk@enif:22:/export/home4/vk/LINK-TO-SSSIDE-VK/test-code/link-to-test_io_net
vk@enif:22:/export/home4/vk/LINK-TO-SSSIDE-VK/test-code/test_io_net/test_io.c

That's because RemoteChildLink class has null cache file, and equals() compares cache files => null == null and it returns true
Comment 3 Vladimir Kvashin 2011-04-05 13:48:54 UTC
This makes working with full remote project that contain a symlink or reside in symlink impossible.
Comment 4 Vladimir Kvashin 2011-04-05 14:28:23 UTC
fixed in cnd-main:
http://hg.netbeans.org/cnd-main/rev/ff200faa5b03
Comment 5 Quality Engineering 2011-04-06 08:43:59 UTC
Integrated into 'main-golden', will be available in build *201104060400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/ff200faa5b03
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fixed #197437 - IllegalArgumentException: Not a DataFolder
Comment 6 Alexander Pepin 2011-04-06 12:59:57 UTC
Verified in trunk.
The fix causes synchronizing problem with an exception in IDE log and it will be filed separately.
Comment 7 Vladimir Kvashin 2011-06-02 09:05:04 UTC
I've just double checked, fix exists both in trunk and in release701.