From 3309c9d85e9c1fdfef1ad53f1e498979faa5bb8f Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Thu, 14 Nov 2013 15:36:01 -0600 Subject: [PATCH] Fix build warnings --- runtime/Java/src/org/antlr/v4/runtime/tree/Trees.java | 4 ++-- tool/test/org/antlr/v4/test/BaseTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/Trees.java b/runtime/Java/src/org/antlr/v4/runtime/tree/Trees.java index c2a3ddbfa..9cd675f2e 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/tree/Trees.java +++ b/runtime/Java/src/org/antlr/v4/runtime/tree/Trees.java @@ -188,9 +188,9 @@ public class Trees { } public static List findAllNodes(ParseTree t, int index, boolean findTokens) { - List nodes = new ArrayList(); + List nodes = new ArrayList(); _findAllNodes(t, index, findTokens, nodes); - return (List)nodes; + return nodes; } public static void _findAllNodes(ParseTree t, int index, boolean findTokens, diff --git a/tool/test/org/antlr/v4/test/BaseTest.java b/tool/test/org/antlr/v4/test/BaseTest.java index bf09413a8..c4b8e25e2 100644 --- a/tool/test/org/antlr/v4/test/BaseTest.java +++ b/tool/test/org/antlr/v4/test/BaseTest.java @@ -543,11 +543,11 @@ public abstract class BaseTest { } public Class loadLexerClassFromTempDir(String name) throws Exception { - return (Class)loadClassFromTempDir(name); + return loadClassFromTempDir(name).asSubclass(Lexer.class); } public Class loadParserClassFromTempDir(String name) throws Exception { - return (Class)loadClassFromTempDir(name); + return loadClassFromTempDir(name).asSubclass(Parser.class); } protected String execParser(String grammarFileName,