aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Laurent Le Brun <laurentlb@google.com>2016-11-23 17:23:21 +0000
committerGravatar Klaus Aehlig <aehlig@google.com>2016-11-23 19:12:54 +0000
commit4956d3207f8d055405b214f01ce571f84a47f6e4 (patch)
tree328d1e9fd11a9878855a02c890cd0b572f653071 /src
parentd700dff5152f5b76a50b6839a8ccc8c8c22e1f5d (diff)
Remove useless function in BuildFileAST.
-- MOS_MIGRATED_REVID=140040343
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/BuildFileAST.java13
-rw-r--r--src/test/java/com/google/devtools/build/lib/syntax/BuildFileASTTest.java3
2 files changed, 2 insertions, 14 deletions
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
@@ -227,19 +227,6 @@ public class BuildFileAST extends ASTNode {
/**
* 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.
*/
public static BuildFileAST parseBuildFile(ParserInputSource input,
List<Statement> preludeStatements,
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