You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2014/01/02 13:20:12 UTC

[Bug 54216] replaceregexp with backlash throws StringIndexOutOfBoundsException

https://issues.apache.org/bugzilla/show_bug.cgi?id=54216

--- Comment #2 from Stefan Bodewig <bo...@apache.org> ---
One culprit here is java.util.regex.Matcher#appendReplacement which throws the
exception if it encounters a replacement that ends in an unescaped backslash.

I agree \\ should not be replaced by \ and the patch I'll attach fixes that,
but I'm afraid this is going to break existing builds that contain quadrupeled
backslashes to work around this long standing "feature".

Maybe just documenting what happens is better than fixing the bug, not sure.

-- 
You are receiving this mail because:
You are the assignee for the bug.