Can't use $ in rules file
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
For example, if you try to create a rule like:
rule com.example.SomeClass$SomeNestedClass
com.example.internal.SomeClass$SomeNestedClass
it won't rename the class because the $ ends up interpreted as the regex
end-of-line pattern, which causes the Wildcard object to fail the match.
I fixed this by adding code to Wildcard.java:
private static Pattern dollar = Pattern.compile("\\$");
(then in the constructor after the other replaceAllLiteral calls)
regex = replaceAllLiteral(dollar, regex, "\\$");
Original issue reported on code.google.com by paraq...@gmail.com
on 23 Nov 2009 at 7:21
Google Code Exporter commented
Here is a patch that implements the above suggestion.
Original comment by mkos...@chromium.org
on 13 Jun 2014 at 3:30
Attachments: