Quote replacement string.

This commit is contained in:
Kristian S. Stangeland 2014-02-11 13:44:56 +01:00
parent f71ed90b04
commit 4e650ec7bf

View File

@ -286,7 +286,7 @@ public final class Reflection {
// Assume the expanded variables are all packages, and append a dot
if (replacement.length() > 0 && matcher.end() < name.length() && name.charAt(matcher.end()) != '.')
replacement += ".";
matcher.appendReplacement(output, replacement);
matcher.appendReplacement(output, Matcher.quoteReplacement(replacement));
}
matcher.appendTail(output);
return output.toString();