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.
If you replace "dist/proj3.jar" with "d i s t/p r o j 3.jar" in ReferenceHelperTest unit test you will get the %SUBJ% exception. Jesse, why AntArtifact.getArtifactLocation() returns URI? Is that necessary? I think the String would be more appropriate. Otherwise the String must be encoded to be usable for URI construction. AFAIK there is not method for this conversion. Unless you want to fix this yourself I can do it. Just let me know your preference.
Please do fix it. The reason for using URI is that it could be either relative ("dist/foo.jar") or absolute ("file:/tmp/foo.jar") and URI provides a reliable way of differentiating these. Note AntArtifact.getArtifactFile impl. I suppose it could also be a String, either a relative or absolute path, though it is less reliable to tell which you have in that case I think. No strong opinion. For "d i s t/p r o j 3.jar" the URI should be "d%20i%20.....3.jar". For "/tmp/f o o.jar" the URI should be "file:/tmp/f%20o%20o.jar".
If it is just a matter of replacing " " with "%20" I would leave there URI and fix it.
Well, ' ' -> "%20" and other substitutions for illegal URI characters... For absolute paths you should be using new File(path).toURI(). For relative paths, maybe there is some kind of utility method to encode special characters properly? Can't you do this with a special URI constructor, perhaps?
You say URI with special constructor, hmmm, that was pretty easy. I should think twice next time before asking dumb questions. Sorry. Fixed: src/org/netbeans/spi/project/support/ant/ReferenceHelper.java; new revision: 1.9; previous revision: 1.8 src/org/netbeans/spi/project/support/ant/SimpleAntArtifact.java; new revision: 1.6; previous revision: 1.5 test/unit/src/org/netbeans/spi/project/support/ant/ReferenceHelperTest.java; new revision: 1.9; previous revision: 1.8
Verified.