Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The class StringSubstitutor incorrectly removes escape characters.
Note that these tests pass:
/** * Tests interpolation with weird boundary patterns. */ @Test public void testReplaceWeirdPattens() throws IOException { doTestNoReplace(StringUtils.EMPTY); doTestNoReplace(EMPTY_EXPR); doTestNoReplace("${ }"); doTestNoReplace("${\t}"); doTestNoReplace("${\n}"); doTestNoReplace("${\b}"); doTestNoReplace("${"); doTestNoReplace("$}"); doTestNoReplace("$$}"); doTestNoReplace("}"); doTestNoReplace("${}$"); doTestNoReplace("${}$$"); doTestNoReplace("${${"); doTestNoReplace("${${}}"); doTestNoReplace("${$${}}"); doTestNoReplace("${$$${}}"); doTestNoReplace("${$$${$}}"); doTestNoReplace("${${}}"); doTestNoReplace("${${ }}"); }
But these tests fail:
/** * Tests interpolation with weird boundary patterns. */ @Test @Disabled public void testReplaceWeirdPattensJira() throws IOException { doTestNoReplace("$${"); doTestNoReplace("$${a"); doTestNoReplace("$$${"); doTestNoReplace("$$${a"); }
Attachments
Issue Links
- is related to
-
TEXT-179 StringSubstitutor incorrectly removes the escape character in "$${${a}"
- Open