alexott commented on a change in pull request #3796:
URL: https://github.com/apache/zeppelin/pull/3796#discussion_r440620034



##########
File path: 
zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/util/SqlSplitter.java
##########
@@ -106,39 +106,30 @@ public SqlSplitter(String... 
additionalSingleCommentPrefixList) {
               && text.length() > (index + 1)) {
         if (isSingleLineComment(text.charAt(index), text.charAt(index + 1))) {
           singleLineComment = true;
-        } else if (text.charAt(index) == '/' && text.charAt(index + 1) == '*') 
{
+        } else if (text.charAt(index) == '/' && text.charAt(index + 1) == '*'
+                && text.length() > (index + 2) && text.charAt(index + 2) != 
'+') {

Review comment:
       sorry, I meant that we can write it as:
   
   ```
   text.charAt(index) == '/' && text.length() > (index + 2) 
     && text.charAt(index + 1) == '*' && text.charAt(index + 2) != '+'
   ```
   
   so we have range check for `index+1` covered, just in case if `index == 
lenght-1`...




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to