tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@m64.com>
Subject RE: use of NT drive specifier in Javac classpath
Date Mon, 27 Dec 1999 11:24:16 GMT
I'm happy with this and I'd like to see it go ahead.

Cheers
Conor

> In any case, I'd like to suggest a different patch, which does essentially
> the same thing but doesn't use two different mechanisms for getting
> characters out of the string.  It also may be infinitesimally faster.
> Thoughts?
>
> Index: Project.java
> ===================================================================
> RCS file:
> /home/cvs/jakarta-tools/ant/src/main/org/apache/tools/ant/Project.java
> ,v
> retrieving revision 1.21
> diff -u -r1.21 Project.java
> --- Project.java        1999/12/13 23:11:51     1.21
> +++ Project.java        1999/12/26 23:38:53
> @@ -448,6 +448,15 @@
>          for (char c = sci.first(); c != CharacterIterator.DONE; c =
> sci.next())
>  {
>              tmp = String.valueOf(c);
>
> +            if (tmp.equals(":")) {
> +               // could be a DOS drive or a Unix path separator...
> +               // if followed by a backslash, assume it is a drive
> +               c = sci.next();
> +               tmp = String.valueOf(c);
> +               bs.append( tmp.equals("\\") ? ":" : path );
> +               if (c == CharacterIterator.DONE) break;
> +           }
> +
>              if (tmp.equals(":") || tmp.equals(";"))
>                  tmp = path;
>              else if (tmp.equals("/") || tmp.equals ("\\"))
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>


Mime
View raw message