Github user cestella commented on a diff in the pull request:
https://github.com/apache/incubator-metron/pull/542#discussion_r113348853
--- 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 --
Dude! Great catch! We're actually closer to JSON escaping because our
strings can start with either `'` or `"`, so I used that escaping strategy and
it worked just fine. Thanks!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---