Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
None
-
None
-
None
Description
This was raised while looking at PIG-1827
There seems to be a bug in PreprocessorContext:
http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/tools/parameters/PreprocessorContext.java?view=markup
235 //String litVal = Matcher.quoteReplacement(val); 236 replaced_line = replaced_line.replaceFirst("\\$"+key, val);
the replacement (2nd) parameter of replaceFirst is not a plain string, it can contain references to the matched pattern like "$0" so $ in val must be escaped.
Does someone know why line 235 is commented out ?
Attachments
Issue Links
- duplicates
-
PIG-2931 $ signs in the replacement string make parameter substitution fail
- Closed