This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
If you try to use <genlist> using the Ant 1.5.2 distribution (i.e. using Xerces 2.3.0 which is shipped with it, as opposed to 2.2.0 shipped with 1.5.1) you get an error: UnsupportedEncodingException: UTF8 At least w/ JDK 1.4.1_01 on Linux. In fact this *is* a bogus encoding; should be "UTF-8". There are two serious bugs in UpdateTracking.write(): 1. It should not use an OutputStreamWriter! With rare exceptions, XML documents should always be read from InputStream's and written to OutputStream's. Using Reader and Writer is generally wrong because the document itself specifies its encoding, and the reader/writer can at best not get it wrong. Suggest that the FileOutputStream be used directly, and that the code in XMLUtil to support Writer be deleted. 2. UpdateTracking.write() catches Exception, prints a stack trace, and returns normally. This is terrible error handling. In fact if you use Ant 1.5.2, the stack traces are printed, but the build continues - with an empty (and thus corrupt) update_tracking/*.xml file. The catch block should first try to delete trackingFile, then throw a BuildException. While you're at it, please fix the incorrect line endings in XMLUtil.java - it has CRNL endings on a Unix checkout from CVS, which means someone took a file from a Windows machine, copied it to a Unix machine without doing the correct CRNL -> NL conversion, and checked it in. Since this bug prevents use of Ant 1.5.2 I consider it very high priority. If you will not fix it in the next couple of days, assign to me and I will. It should be merged to 3.5 as well.
Actually I already have a patch that seems to work.
committed * Up-To-Date 1.17 nbbuild/antsrc/org/netbeans/nbbuild/UpdateTracking.java committed * Up-To-Date 1.10 nbbuild/antsrc/org/netbeans/nbbuild/XMLUtil.java
Also XMLUtil.java 1.12 for Crimson.
Merged. committed * Up-To-Date 1.16.2.1 nbbuild/antsrc/org/netbeans/nbbuild/UpdateTracking.java committed * Up-To-Date 1.9.2.1 nbbuild/antsrc/org/netbeans/nbbuild/XMLUtil.java
Also cleaning up a couple other places where DOM -> Writer was coded (but unused), in the trunk for 4.0: committed * Up-To-Date 1.6 openide/src/org/openide/xml/XMLUtilImpl.java committed * Up-To-Date 1.6 autoupdate/libsrc/org/netbeans/updater/XMLUtil.java