ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yossie Teitz <yos...@reachcast.co.il>
Subject Bug 724: more data
Date Tue, 09 Jan 2001 12:47:34 GMT
Dear supporter,
 
I noticed that these fields got left out of the bug report. I didn't want
them to be missed so I included them in this mail.
 
Thanks,
Yossie
 
 
Reproduction:
 
1. Create a build.xml file in directory c:/temp/x#y.
2. Run ant.
3. Watch it fail with the following error:
   java.io.FileNotFoundException: c:\temp\x
 
 
Workaround:
 
Changed the method org.apache.tools.ant.ProjectHelper.parse() by switching
the line:
    saxParser.parse(buildFile, new RootHandler());
 
to:
    FileInputStream inputStream = new FileInputStream(buildFile);
    saxParser.parse(inputStream, new RootHandler());
            
SAXParser.parse has different versions that take different input arguments.
ANT currently calls SAXParser.parse(File, HandlerBase). Since we know that
we are using a buildfile, we open the file and  pass its InputStream to
SAXParser.parse(InputStream, HandlerBase).

Mime
View raw message