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.
NClassPath.getClassPath() adds quotes at the beginning and the end whenever the CP contains white spaces. Adding quotes should be handled by the user of NbClassPath and not by NbCP itself.
Hmm, I don't think so - but anyway, the result of NbClassPath.getClassPath() is used at various places in the IDE, which assumes there are quotes. If you decide to accept/fix this issue, please attach a patch at first and notify people on nbdev@ that and how they should adapt their code.
Maybe I was unclear: It does not *always* add quotes, only when the CP contains white spaces. This is inconsistent (and should be documented at least). Below Jesse's answer to this issue ------ Yes, I agree it is incorrect for NbClassPath to add its own quoting, that is not its responsibility. I would file a bug against NbClassPath. There are a lot of messy quoting things implemented in NbProcessDescriptor especially which I've never really understood; part of the problem is the inconsistencies between Windows and Unix quoting rules. NbProcessDescriptor is *supposed* to behave as if the Unix Bourne shell were being used, and accommodate platform differences accordingly; but I doubt this really works as described. --- I know that such changes affect a lot of other code. Maybe we should at least consider to clean up such things for the 4.0 version.
Assigning. So if this will be changed into 4.0, don't forget to change the target milestone.
Not doable for 3.3. I am afraid that it would touch too many dark sides of our code... Maybe not doable at all.
later
later again
reopen
This was the cause of issue #17148.
This issue will not be fixed for NetBeans 3.*. Hopefully the NbClassPath will be superseded by ClassPath API in NetBeans 4.0, so usage of NbClassPath will be most probably deprecated (as it queries filesystems) in favour of the new APIs. The issue is almost uncorrectable in the IDE's current implementation, since clients of NbClassPath rely on that it quotes the string if necessary, if clients of NbProcessDescriptor were the only ones, proper quoting could be done in NBPD, but the result string is used in more places. It could be possible to add quotes always to the result string, but it does not seem necessary: clients which manipulate w/ the result are already aware of that the string may be quoted.
Can we at least add to the Javadoc a *warning* about what it is going to do? "clients which manipulate w/ the result are already aware of that the string may be quoted" - not true of random people innocently using the API, since code tested on normal examples (no spaces in path etc.) will seem to work fine, but could break suddenly with strange pathnames.
Will do. I will mention as well that the NbClassPath functionality may be deprecated in the next version of NetBeans, OK ?
Comment about quoting added. Again closing as wontfix, will be superseded by new APIs (ClassPath API ?)
Without new informations for long time - verifying.