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 204271

Summary: Change the GenericSources.Group, SourcesHelper.SourceRoot not to throw IAE when root is not valid.
Product: projects Reporter: Tomas Zezula <tzezula>
Component: Generic InfrastructureAssignee: Jesse Glick <jglick>
Status: RESOLVED FIXED    
Severity: normal CC: apireviews, chepanemo
Priority: P3 Keywords: API, API_REVIEW_FAST
Version: 7.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 128032, 144391, 150015, 157361, 161904, 187030, 202414    
Attachments: Proposed patch

Description Tomas Zezula 2011-10-26 12:30:09 UTC
Change the GenericSources.Group, SourcesHelper.SourceRoot not to throw IAE when root is not valid but rather return false. It seems that FS allows valid FileObjects under invalid root, the clients of SourceGroup need to catch the IAE.
See issue #157361.
Comment 1 Jesse Glick 2011-11-08 21:03:32 UTC
Created attachment 113022 [details]
Proposed patch
Comment 2 Jesse Glick 2011-11-08 21:04:22 UTC
Please review.
Comment 3 Tomas Zezula 2011-11-14 08:37:11 UTC
Seems good to me.
Thanks for updating java.project.
Comment 4 Jesse Glick 2011-11-14 19:35:26 UTC
*** Bug 202596 has been marked as a duplicate of this bug. ***
Comment 5 Jesse Glick 2011-11-15 14:40:56 UTC
core-main #c45c8f210a9d
Comment 6 Quality Engineering 2011-11-16 15:48:36 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/c45c8f210a9d
User: Jesse Glick <jglick@netbeans.org>
Log: #204271: just return false, rather than throwing IAE, from SourceGroup.contains for a file not inside root.
Due to bugs in masterfs relating to invalid files, it is impractical for the caller to verify this precondition.