Browse Source

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 <A.Dannecker@gmx.de>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267993 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 25 years ago
parent
commit
002d084d5d
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/main/org/apache/tools/ant/ProjectHelper.java

+ 3
- 3
src/main/org/apache/tools/ant/ProjectHelper.java View File

@@ -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);


Loading…
Cancel
Save