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 57304 - 1-letter source roots marked as broken references
Summary: 1-letter source roots marked as broken references
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Lahoda
Depends on:
Reported: 2005-04-01 09:56 UTC by zikmund
Modified: 2006-03-24 13:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Patch to fix this problem. (2.10 KB, patch)
2005-04-13 20:27 UTC, Jan Lahoda
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zikmund 2005-04-01 09:56:05 UTC
Build 200503301800

1) Have existing Java sources where one of your source roots has 1-letter name
(e.g. 'j' or 's')
2) Create project with existing sources (do not add source root through
project's Properties after project creation!)
3) Browse location of your sources, Finish
Created project has permanent Broken reference to 1-letter source root which
can't be resolved, although 1-letter source root is view in Projects window
well. Build doesn't fail too.

Note: problem is that the couple from
is detected as broken reference although it is OK.

BTW: Removing 'j' in project Properties will leave file.reference.* property in file.
Comment 1 Tomas Zezula 2005-04-01 12:28:51 UTC
It is related to the PropertyUtils.tokenizePath (String), if it gets folder
named "s" it returns an empty array. See PropertyUtils (594).
Comment 2 Jesse Glick 2005-04-03 19:21:27 UTC
Too late for 4.1 unless this can be considered a P2. I doubt many users have
source dirs with only one letter, but that is just a guess.
Comment 3 Jan Chalupa 2005-04-03 20:22:03 UTC
Simple fix?
Comment 4 zikmund 2005-04-04 09:16:11 UTC
From directories point of view, IMO it's OK to be P3.
Question is: does it apply to any one letter name in properties? It could be
probably more serious.
Comment 5 Jesse Glick 2005-04-04 23:54:31 UTC
Don't know if it's a simple fix or not, haven't tried.
Comment 6 Jan Lahoda 2005-04-13 20:27:03 UTC
It seems that the fix is quite simple (see the attached diff). Jesse, what do
you think about it?
Comment 7 Jan Lahoda 2005-04-13 20:27:48 UTC
Created attachment 21623 [details]
Patch to fix this problem.
Comment 8 Jesse Glick 2005-04-13 20:34:34 UTC
Looks OK to me, feel free to commit. Not a 4.1 candidate unless made P2, I guess.
Comment 9 Jan Lahoda 2005-04-13 22:59:41 UTC
Fixed by:
Checking in project/src/org/netbeans/spi/project/support/ant/;
new revision: 1.27; previous revision: 1.26
Checking in
new revision: 1.17; previous revision: 1.16
Comment 10 zikmund 2005-05-25 15:48:03 UTC
Verified in 200505250639.