From 002d084d5d809016ae2bd425912f3e6cd5066526 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 14 Sep 2000 14:04:38 +0000 Subject: [PATCH] Provide the SAXParser with the File instead of an InputSource to give it a chance to parse relative URIs. PR: 54 Submitted by: Achim Dannecker git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267993 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/ProjectHelper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/org/apache/tools/ant/ProjectHelper.java b/src/main/org/apache/tools/ant/ProjectHelper.java index b9d34809a..c25c170c0 100644 --- a/src/main/org/apache/tools/ant/ProjectHelper.java +++ b/src/main/org/apache/tools/ant/ProjectHelper.java @@ -97,9 +97,9 @@ public class ProjectHelper { */ private void parse() throws BuildException { try { - parser = getParserFactory().newSAXParser().getParser(); - parser.setDocumentHandler(new RootHandler()); - parser.parse(new InputSource(new FileReader(buildFile))); + SAXParser saxParser = getParserFactory().newSAXParser(); + parser = saxParser.getParser(); + saxParser.parse(buildFile, new RootHandler()); } catch(ParserConfigurationException exc) { throw new BuildException("Parser has not been configured correctly", exc);