Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 43190 - AntReferenceHelper must encode spaces
AntReferenceHelper must encode spaces
Product: projects
Classification: Unclassified
Component: Ant
All All
: P3 (vote)
: 4.x
Assigned To: David Konecny
Depends on:
  Show dependency treegraph
Reported: 2004-05-13 09:30 UTC by David Konecny
Modified: 2006-03-24 09:53 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2004-05-13 09:30:54 UTC
1. wrong property name is created when referenced
project contains spaces in name

(see also issue 42903)
Comment 1 David Konecny 2004-05-17 12:50:38 UTC
Adam, I realized that this is your bug. The reference ID uses
ProjectInformation.getName() and Javadoc of this method says that
returned name is programmatic name for usage in Ant scripts. It is job
of your project type to return something without spaces.

Check also issue 42732 in which I implemented two methods which you
could use for this.
Comment 2 David Konecny 2004-05-17 14:07:10 UTC
Adam, see also issue 43364.
Comment 3 Jesse Glick 2004-05-17 16:53:54 UTC
I hope ReferenceHelper does appropriate sanity checking of incoming
reference IDs, e.g. from ProjectInformation.getName(), and reacts
appropriately? Should IMHO either create a proper name quietly or log
a proper message. Prefer the former, since ReferenceHelper is
responsible for making its own suitable IDs for subprojects -
should be used as a hint, but it may be uniquified anyway.
Comment 4 David Konecny 2004-05-17 17:02:28 UTC
RH can do sanity check of incoming IDs, but is not that useless code
duplicity? The PI.getName is API and says that it must be ID. What you
are suggesting means that nobody should rely on it and create their
own IDs. Then what's the value of PI.getName. I could use directly
displayName and encode an ID from it.

It is trivial change (and I already had that done) to call
PU.getUsablePropertyName, but it seemed to me redundant.
Comment 5 Jesse Glick 2004-05-17 17:05:51 UTC
Feel free to log an error message if the is inappropriate, but
RH should still be more robust against API usage errors.
Comment 6 David Konecny 2004-05-17 17:53:40 UTC
Fixed in:
new revision: 1.10; previous revision: 1.9
Comment 7 Jaromir Uhrik 2005-07-14 16:18:36 UTC

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo