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.
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 4) ERROR: 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 project.properties: file.reference.JavaPrj2-j=j j.dir=${file.reference.JavaPrj2-j} is detected as broken reference although it is OK. BTW: Removing 'j' in project Properties will leave file.reference.* property in project.properties file.
It is related to the PropertyUtils.tokenizePath (String), if it gets folder named "s" it returns an empty array. See PropertyUtils (594).
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.
Simple fix?
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.
Don't know if it's a simple fix or not, haven't tried.
It seems that the fix is quite simple (see the attached diff). Jesse, what do you think about it?
Created attachment 21623 [details] Patch to fix this problem.
Looks OK to me, feel free to commit. Not a 4.1 candidate unless made P2, I guess.
Fixed by: Checking in project/src/org/netbeans/spi/project/support/ant/PropertyUtils.java; /cvs/ant/project/src/org/netbeans/spi/project/support/ant/PropertyUtils.java,v <-- PropertyUtils.java new revision: 1.27; previous revision: 1.26 done Checking in project/test/unit/src/org/netbeans/spi/project/support/ant/PropertyUtilsTest.java; /cvs/ant/project/test/unit/src/org/netbeans/spi/project/support/ant/PropertyUtilsTest.java,v <-- PropertyUtilsTest.java new revision: 1.17; previous revision: 1.16 done
Verified in 200505250639.