[EMAIL PROTECTED] ha scritto:
> Author: berndf
> Date: Mon Aug 13 07:10:08 2007
> New Revision: 565357
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=565357
> Log:
> implement extended interface FileManager and add classpath loading 
> capabilities.
> see JAMES-803, thanks for the initial patch to Zsombor.
> also, fix the hardcoded file loading behavior for conf files (which will be 
> made configurable in another step)
> [...]
> +    private static final String FILE_PROTOCOL = "file://";
> +    private static final String FILE_PROTOCOL_AND_CONF = "file://conf/";
> [...]
> -        if (fileURL.startsWith("file://")) {
> -            if (fileURL.startsWith("file://conf/")) {
> -                return new File("./src/trunk/config/"+fileURL.substring(12));
> +        if (fileURL.startsWith(FILE_PROTOCOL)) {
> +            if (fileURL.startsWith(FILE_PROTOCOL_AND_CONF)) {
> +                return new File("./src/main/config/" + 
> FILE_PROTOCOL_AND_CONF.substring(12));
>              } else {
> -             return new File("./"+fileURL.substring(7));
> +             return new File("./" + FILE_PROTOCOL.substring(7));
>              }

I think this is not correct.
fileURL.substring(12) cannot be replaced by
FILE_PROTOCOL_AND_CONF.substring(12)
also
fileURL.substring(7)
cannot be replaced by
FILE_PROTOCOL.substring(7)

I think this does not work at all.

Also, there are some TABS instead of SPACES left around (maybe they was
there before your patch)

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to