From 4956d3207f8d055405b214f01ce571f84a47f6e4 Mon Sep 17 00:00:00 2001 From: Laurent Le Brun Date: Wed, 23 Nov 2016 17:23:21 +0000 Subject: Remove useless function in BuildFileAST. -- MOS_MIGRATED_REVID=140040343 --- .../com/google/devtools/build/lib/syntax/BuildFileAST.java | 13 ------------- .../google/devtools/build/lib/syntax/BuildFileASTTest.java | 3 ++- 2 files changed, 2 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/main/java/com/google/devtools/build/lib/syntax/BuildFileAST.java b/src/main/java/com/google/devtools/build/lib/syntax/BuildFileAST.java index ad58b48349..473c54c301 100644 --- a/src/main/java/com/google/devtools/build/lib/syntax/BuildFileAST.java +++ b/src/main/java/com/google/devtools/build/lib/syntax/BuildFileAST.java @@ -224,19 +224,6 @@ public class BuildFileAST extends ASTNode { visitor.visit(this); } - /** - * Parse the specified build file, returning its AST. All errors during - * scanning or parsing will be reported to the reporter. - * - * @throws IOException if the file cannot not be read. - */ - public static BuildFileAST parseBuildFile(Path buildFile, long fileSize, - EventHandler eventHandler) - throws IOException { - ParserInputSource inputSource = ParserInputSource.create(buildFile, fileSize); - return parseBuildFile(inputSource, eventHandler); - } - /** * Parse the specified build file, returning its AST. All errors during * scanning or parsing will be reported to the reporter. diff --git a/src/test/java/com/google/devtools/build/lib/syntax/BuildFileASTTest.java b/src/test/java/com/google/devtools/build/lib/syntax/BuildFileASTTest.java index ff448339be..0a1b4fe74b 100644 --- a/src/test/java/com/google/devtools/build/lib/syntax/BuildFileASTTest.java +++ b/src/test/java/com/google/devtools/build/lib/syntax/BuildFileASTTest.java @@ -48,7 +48,8 @@ public class BuildFileASTTest extends EvaluationTestCase { */ private BuildFileAST parseBuildFile(String... lines) throws IOException { Path file = scratch.file("/a/build/file/BUILD", lines); - return BuildFileAST.parseBuildFile(file, file.getFileSize(), getEventHandler()); + ParserInputSource inputSource = ParserInputSource.create(file, file.getFileSize()); + return BuildFileAST.parseBuildFile(inputSource, getEventHandler()); } @Test -- cgit v1.2.3