You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2017/08/15 23:59:02 UTC

groovy git commit: Cleanup code

Repository: groovy
Updated Branches:
  refs/heads/master 6176c6d33 -> e4a106901


Cleanup code


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/e4a10690
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/e4a10690
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/e4a10690

Branch: refs/heads/master
Commit: e4a106901a93dba53945e79965715be2d770a758
Parents: 6176c6d
Author: sunlan <su...@apache.org>
Authored: Wed Aug 16 07:58:57 2017 +0800
Committer: sunlan <su...@apache.org>
Committed: Wed Aug 16 07:58:57 2017 +0800

----------------------------------------------------------------------
 .../internal/DescriptiveErrorStrategy.java      | 21 ++++++++++----------
 1 file changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/e4a10690/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/internal/DescriptiveErrorStrategy.java
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/internal/DescriptiveErrorStrategy.java b/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/internal/DescriptiveErrorStrategy.java
index 1a9c8fa..ddb0665 100644
--- a/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/internal/DescriptiveErrorStrategy.java
+++ b/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/internal/DescriptiveErrorStrategy.java
@@ -30,7 +30,6 @@ import org.antlr.v4.runtime.Token;
 import org.antlr.v4.runtime.TokenStream;
 import org.antlr.v4.runtime.atn.PredictionMode;
 import org.antlr.v4.runtime.misc.Interval;
-import org.antlr.v4.runtime.misc.NotNull;
 import org.antlr.v4.runtime.misc.ParseCancellationException;
 
 /**
@@ -90,32 +89,32 @@ public class DescriptiveErrorStrategy extends BailErrorStrategy {
     }
 
     @Override
-    protected void reportNoViableAlternative(@NotNull Parser recognizer,
-                                             @NotNull NoViableAltException e) {
+    protected void reportNoViableAlternative(Parser recognizer,
+                                             NoViableAltException e) {
 
         notifyErrorListeners(recognizer, this.createNoViableAlternativeErrorMessage(recognizer, e), e);
     }
 
-    protected String createInputMismatchErrorMessage(@NotNull Parser recognizer,
-                                                     @NotNull InputMismatchException e) {
+    protected String createInputMismatchErrorMessage(Parser recognizer,
+                                                     InputMismatchException e) {
         return "Unexpected input: " + getTokenErrorDisplay(e.getOffendingToken(recognizer)) +
                 "; Expecting " + e.getExpectedTokens().toString(recognizer.getVocabulary());
     }
 
-    protected void reportInputMismatch(@NotNull Parser recognizer,
-                                       @NotNull InputMismatchException e) {
+    protected void reportInputMismatch(Parser recognizer,
+                                       InputMismatchException e) {
 
         notifyErrorListeners(recognizer, this.createInputMismatchErrorMessage(recognizer, e), e);
     }
 
 
-    protected String createFailedPredicateErrorMessage(@NotNull Parser recognizer,
-                                                       @NotNull FailedPredicateException e) {
+    protected String createFailedPredicateErrorMessage(Parser recognizer,
+                                                       FailedPredicateException e) {
         return e.getMessage();
     }
 
-    protected void reportFailedPredicate(@NotNull Parser recognizer,
-                                         @NotNull FailedPredicateException e) {
+    protected void reportFailedPredicate(Parser recognizer,
+                                         FailedPredicateException e) {
         notifyErrorListeners(recognizer, this.createFailedPredicateErrorMessage(recognizer, e), e);
     }
 }