You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by al...@apache.org on 2019/03/19 17:28:08 UTC
[asterixdb] branch master updated: [NO ISSUE][OTH] Redact syntax
error messages
This is an automated email from the ASF dual-hosted git repository.
alsuliman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
The following commit(s) were added to refs/heads/master by this push:
new fe90189 [NO ISSUE][OTH] Redact syntax error messages
fe90189 is described below
commit fe90189b68b19a8029f33f4788102962d5c1b292
Author: Ali Alsuliman <al...@gmail.com>
AuthorDate: Tue Mar 19 01:40:35 2019 -0700
[NO ISSUE][OTH] Redact syntax error messages
- user model changes: no
- storage format changes: no
- interface changes: no
Redact syntax error messages in the grammar file.
Change-Id: I41143377689488ef9c05dc5b3650fc62a3a5420e
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3282
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mh...@apache.org>
---
asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
index e50f68f..05b88cc 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
+++ b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
@@ -332,11 +332,11 @@ class SQLPPParser extends ScopeChecker implements IParser {
// this is here as the JavaCharStream that's below the lexer sometimes throws Errors that are not handled
// by the ANTLR-generated lexer or parser (e.g it does this for invalid backslash u + 4 hex digits escapes)
final String msg = e.getClass().getSimpleName() + (e.getMessage() != null ? ": " + e.getMessage() : "");
- throw new CompilationException(ErrorCode.PARSE_ERROR, msg);
+ throw new CompilationException(ErrorCode.PARSE_ERROR, LogRedactionUtil.userData(msg));
} catch (SqlppParseException e) {
- throw new CompilationException(ErrorCode.PARSE_ERROR, e.getSourceLocation(), getMessage(e));
+ throw new CompilationException(ErrorCode.PARSE_ERROR, e.getSourceLocation(), LogRedactionUtil.userData(getMessage(e)));
} catch (ParseException e) {
- throw new CompilationException(ErrorCode.PARSE_ERROR, getMessage(e));
+ throw new CompilationException(ErrorCode.PARSE_ERROR, LogRedactionUtil.userData(getMessage(e)));
}
}