Ok, I finally had some time to look at this. Here is my feedback:
on NetWare the existing code only needed two small changes to work, in
both toURI and fromURI. The change in toURI is one that I think is
necessary for all platforms anyway.
In toURI. there is the following code:
try {
path = normalize(path).getAbsolutePath();
sb.append("//");
// add an extra slash for filesystems with drive-specifiers
if (!path.startsWith("/")) {
sb.append("/");
}
} catch (BuildException e) {
// relative path
}
Shouldn't the last if statement instead be the following?:
if (!path.startsWith(File.separator)) {
sb.append("/");
}
With this one change, toURI seems to work well on NetWare. I would
also add some tests to FileUtilsTest.java (diff file attached,
FileUtilsTestFromURIPatch.txt)
in fromURI, I think it is sufficient to look for a ":" anywhere in the
filename, instead of just at the second position. An change from
uri.charAt(2) == ':' to uri.lastIndexOf(':') > -1 seems to work for on
Windows and NetWare. I've attached diff files for Locator and
FileUtils
Hopefully my attachments are in a format that won't be stripped by the
mailing list, I can never remember what extension they need.
I'll look into the other test failures on NetWare as well, that didn't
seem to be related to this new Launcher and / or FileUtils changes.
(Available and SignJar both fail on NW currently).
Jeff Tulley (jtulley@novell.com)
(801)861-5322
Novell, Inc., The Leading Provider of Net Business Solutions
http://www.novell.com
>>> bodewig@apache.org 7/11/03 2:23:33 AM >>>
On Thu, 10 Jul 2003, Jeff Tulley <JTULLEY@novell.com> wrote:
> Looking at it, the fromURI is a method I should have considered and
> added some NetWare test cases for.
fromURI is rather new - compared to the other Netware related stuff
you've submitted.
> I'll work out some test cases, see if the previous code handled them
> and suggest changes if necessary.
Great.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
|