Ali Alsuliman has submitted this change and it was merged.

Change subject: [NO ISSUE][OTH] Redact syntax error messages
......................................................................


[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 <[email protected]>
Tested-by: Jenkins <[email protected]>
Contrib: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: Murtadha Hubail <[email protected]>
---
M asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Anon. E. Moose #1000171: 
  Jenkins: Verified; No violations found; ; Verified
  Murtadha Hubail: Looks good to me, approved



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 @@
             // 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)));
         }
     }
 

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/3282
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I41143377689488ef9c05dc5b3650fc62a3a5420e
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ali Alsuliman <[email protected]>
Gerrit-Reviewer: Ali Alsuliman <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>

Reply via email to