[ https://issues.apache.org/jira/browse/OOZIE-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14364684#comment-14364684 ]
Harsh J commented on OOZIE-2171: -------------------------------- +1 again. > Some error code messages are not parsed correctly due to unescaped single > quote > ------------------------------------------------------------------------------- > > Key: OOZIE-2171 > URL: https://issues.apache.org/jira/browse/OOZIE-2171 > Project: Oozie > Issue Type: Bug > Affects Versions: trunk > Reporter: Robert Kanter > Assignee: Robert Kanter > Attachments: OOZIE-2171.patch, OOZIE-2171.patch > > > We noticed that the improved whitelist error messages added by OOZIE-2072 > weren't being printed properly: > e.g. > {code} > Error: E0901 : E0901: NameNode [localhost:8020] not allowed, not in > Oozies whitelist. Allowed values are: {1} > {code} > Turns out that {{MessageFormat}} requires that single quotes are escaped by > another single quote; otherwise, it: > - doesn't render the single quote > - doesn't parse the \{#\} tokens after the single quote. > For example, > {code} > foo("{0} don't have {1}", "I", "a problem") > {code} > would render as > {code} > "I dont have {1}" > {code} > We have to replace {{'}} with {{''}} to escape it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)