From 3506dcef1d7bfb5389ae8de2a29fd94bfad9a489 Mon Sep 17 00:00:00 2001 From: parrt Date: Fri, 25 Nov 2016 12:52:44 -0800 Subject: [PATCH] add @Override to hush warnings. Manually did some of https://github.com/antlr/antlr4/pull/1066 --- runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPath.java | 1 + tool/src/org/antlr/v4/codegen/target/JavaScriptTarget.java | 3 +++ tool/src/org/antlr/v4/gui/TreeViewer.java | 1 + 3 files changed, 5 insertions(+) diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPath.java b/runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPath.java index 7bd249f6b..8d721d61d 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPath.java +++ b/runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPath.java @@ -85,6 +85,7 @@ public class XPath { throw new IllegalArgumentException("Could not read path: "+path, ioe); } XPathLexer lexer = new XPathLexer(in) { + @Override public void recover(LexerNoViableAltException e) { throw e; } }; lexer.removeErrorListeners(); diff --git a/tool/src/org/antlr/v4/codegen/target/JavaScriptTarget.java b/tool/src/org/antlr/v4/codegen/target/JavaScriptTarget.java index a229942ff..1e4540bdc 100644 --- a/tool/src/org/antlr/v4/codegen/target/JavaScriptTarget.java +++ b/tool/src/org/antlr/v4/codegen/target/JavaScriptTarget.java @@ -220,14 +220,17 @@ public class JavaScriptTarget extends Target { } + @Override public boolean wantsBaseListener() { return false; } + @Override public boolean wantsBaseVisitor() { return false; } + @Override public boolean supportsOverloadedMethods() { return false; } diff --git a/tool/src/org/antlr/v4/gui/TreeViewer.java b/tool/src/org/antlr/v4/gui/TreeViewer.java index 96a0ca213..e9ec00134 100644 --- a/tool/src/org/antlr/v4/gui/TreeViewer.java +++ b/tool/src/org/antlr/v4/gui/TreeViewer.java @@ -393,6 +393,7 @@ public class TreeViewer extends JComponent { // make viz WindowListener exitListener = new WindowAdapter() { + @Override public void windowClosing(WindowEvent e) { prefs.putInt(DIALOG_WIDTH_PREFS_KEY, (int) dialog.getSize().getWidth()); prefs.putInt(DIALOG_HEIGHT_PREFS_KEY, (int) dialog.getSize().getHeight());