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 - Change the GenericSources.Group, SourcesHelper.SourceRoot not to throw IAE when root is not valid.
Summary: Change the GenericSources.Group, SourcesHelper.SourceRoot not to throw IAE wh...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords: API, API_REVIEW_FAST
: 202596 (view as bug list)
Depends on:
Blocks: 128032 144391 150015 157361 161904 187030 202414
  Show dependency tree
 
Reported: 2011-10-26 12:30 UTC by Tomas Zezula
Modified: 2011-11-16 15:48 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed patch (19.72 KB, patch)
2011-11-08 21:03 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.