[
https://issues.apache.org/jira/browse/METRON-873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15980655#comment-15980655
]
ASF GitHub Bot commented on METRON-873:
---------------------------------------
Github user ottobackwards commented on a diff in the pull request:
https://github.com/apache/incubator-metron/pull/542#discussion_r112856776
--- Diff:
metron-platform/metron-common/src/main/java/org/apache/metron/common/stellar/StellarCompiler.java
---
@@ -263,7 +263,56 @@ public void exitVariable(StellarParser.VariableContext
ctx) {
@Override
public void exitStringLiteral(StellarParser.StringLiteralContext ctx) {
- expression.tokenDeque.push(new Token<>(ctx.getText().substring(1,
ctx.getText().length() - 1), String.class));
+ String rawToken = ctx.getText();
+ String literal = unquoteLiteral(rawToken);
+
+ expression.tokenDeque.push(new Token<>(literal, String.class));
+ }
+
--- End diff --
https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringEscapeUtils.html
?
> Stellar string literals do not support quote escaping
> -----------------------------------------------------
>
> Key: METRON-873
> URL: https://issues.apache.org/jira/browse/METRON-873
> Project: Metron
> Issue Type: Improvement
> Reporter: Casey Stella
>
> Right now, in stellar, we cannot represent a string literal that contains
> 'foo' if the string is quoted with ' or "foo" if the string is quoted with ".
> This is unfortunate and should be corrected.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)