[Yanel-dev] String.replaceAll problem
Josias Thöny
josias.thoeny at wyona.com
Mon Dec 10 09:09:41 CET 2007
Evaldas Taroza wrote:
> Hi,
> I am on Windows and I get many many errors logged when I open Yanel web
> page. Most of them are generated in YanelServlet 1979 line and what
> matters is:
>
> htdocsPath = "yanel-htdocs" + path.split("::" + name)[1].split("/" +
> reservedPrefix)[1].replaceAll("/", File.separator);
>
> I debugged that line and it appears that replaceAll("/", File.separator)
> causes problems.
>
> In windows the path separator is "\" which on the above replacement
> causes StringIndexOutOfBoundsException. What actually works is
>
> replaceAll("/", "\\\\")
maybe we could try the character-based method:
replace('/', File.separatorChar);
josias
>
> and I am not sure how to solve it. Maybe the replacement is not needed
> at all? Or the bug is in the regular java expressions?
>
> Evaldas
> _______________________________________________
> Yanel-development mailing list
> Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
More information about the Yanel-development
mailing list