Fix build warnings

This commit is contained in:
Sam Harwell 2013-11-14 15:36:01 -06:00
parent 10cd96f809
commit 3309c9d85e
2 changed files with 4 additions and 4 deletions

View File

@ -188,9 +188,9 @@ public class Trees {
}
public static List<ParseTree> findAllNodes(ParseTree t, int index, boolean findTokens) {
List<? super ParseTree> nodes = new ArrayList<ParseTree>();
List<ParseTree> nodes = new ArrayList<ParseTree>();
_findAllNodes(t, index, findTokens, nodes);
return (List<ParseTree>)nodes;
return nodes;
}
public static void _findAllNodes(ParseTree t, int index, boolean findTokens,

View File

@ -543,11 +543,11 @@ public abstract class BaseTest {
}
public Class<? extends Lexer> loadLexerClassFromTempDir(String name) throws Exception {
return (Class<? extends Lexer>)loadClassFromTempDir(name);
return loadClassFromTempDir(name).asSubclass(Lexer.class);
}
public Class<? extends Parser> loadParserClassFromTempDir(String name) throws Exception {
return (Class<? extends Parser>)loadClassFromTempDir(name);
return loadClassFromTempDir(name).asSubclass(Parser.class);
}
protected String execParser(String grammarFileName,