DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18406>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18406 nightly build script throws npe under some (common) conditions ------- Additional Comments From [EMAIL PROTECTED] 2003-03-27 12:50 ------- I did not know that id are resolved at parse time, I always assumed that they are like properties, one learns something new about ant each day. :) On further investigation, you are right about the cause been interaction with UnknownElement. changing Project$AntRefTable#get(Object key) to boolean doprint = "xmlpath".equals(key); if (doprint) System.out.println("AntRefTable.get " + key); Object o = super.get(key); if (doprint) System.out.println("got " + o); if (o instanceof UnknownElement) { if (doprint) System.out.println("It is a UnknownElement"); // Make sure that ((UnknownElement) o).maybeConfigure(); o = ((UnknownElement) o).getTask(); if (doprint) System.out.println("after get task " + o); if (o == null) { o = super.get(key); if (doprint) System.out.println("AFTER get again " + o); } } if (doprint) System.out.println( "AntRefTable.get " + key + " return " + o); return o; gives the following output [script] AntRefTable.get xmlpath [script] got [EMAIL PROTECTED] [script] It is a UnknownElement [script] after get task null [script] AFTER get again /home/preilly/proj/learning/script/bizzare.xml:/home/preilly/proj/learning/script/build.xml [script] AntRefTable.get xmlpath return /home/preilly/proj/learning/script/bizzare.xml:/home/preilly/proj/learning/script/build.xml [script] AntRefTable.get xmlpath [script] got /home/preilly/proj/learning/script/bizzare.xml:/home/preilly/proj/learning/script/build.xml [script] AntRefTable.get xmlpath return /home/preilly/proj/learning/script/bizzare.xml:/home/preilly/proj/learning/script/build.xml BUILD SUCCESSFUL