You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Robert Kanter (JIRA)" <ji...@apache.org> on 2015/03/16 20:27:38 UTC
[jira] [Updated] (OOZIE-2171) Some error code messages are not
parsed correctly due to unescaped single quote
[ https://issues.apache.org/jira/browse/OOZIE-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Kanter updated OOZIE-2171:
---------------------------------
Attachment: OOZIE-2171.patch
The patch fixes all instances of {{'}} by replacing them with {{''}}, adds a test that will fail if you have a single single quote in {{ErrorCode}} in the future, and added tests for the whitelist validation improvements in OOZIE-2072.
> 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
>
>
> 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)