This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 8b0aca3  Improve the robustness of smart highlighter
8b0aca3 is described below

commit 8b0aca3981565f99c7dc1628e99759c3a5053157
Author: Daniel Sun <[email protected]>
AuthorDate: Sun Jun 16 01:25:57 2019 +0800

    Improve the robustness of smart highlighter
---
 .../src/main/groovy/groovy/console/ui/text/SmartDocumentFilter.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/text/SmartDocumentFilter.java
 
b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/text/SmartDocumentFilter.java
index e561ea5..ed435cf 100644
--- 
a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/text/SmartDocumentFilter.java
+++ 
b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/text/SmartDocumentFilter.java
@@ -280,7 +280,7 @@ public class SmartDocumentFilter extends DocumentFilter {
             return tokenList.subList(startTokenIndex, stopTokenIndex);
         }
 
-        return Collections.emptyList();
+        return tokenList; // should never reach here. If unexpected error 
occurred, it's better to render all tokens
     }
 
     private Style findStyleByTokenType(int tokenType) {

Reply via email to