Return-Path: Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Delivered-To: mailing list dev@ant.apache.org Received: (qmail 28345 invoked from network); 27 Mar 2003 13:14:12 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 27 Mar 2003 13:14:12 -0000 Received: (qmail 6870 invoked by uid 50); 27 Mar 2003 13:15:58 -0000 Date: 27 Mar 2003 13:15:58 -0000 Message-ID: <20030327131558.6869.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: dev@ant.apache.org Cc: Subject: DO NOT REPLY [Bug 18406] - nightly build script throws npe under some (common) conditions X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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 peter.reilly@corvil.com 2003-03-27 13:15 ------- Make the patch a little more robust, null may have been put in the map by maybeconfigure. Index: Project.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/Project.java,v retrieving revision 1.132 diff -u -r1.132 Project.java --- Project.java 17 Feb 2003 14:12:10 -0000 1.132 +++ Project.java 27 Mar 2003 13:09:54 -0000 @@ -2195,6 +2195,14 @@ // Make sure that ((UnknownElement) o).maybeConfigure(); o = ((UnknownElement) o).getTask(); + // if this is not a task it may be + // something else which placed itself in the map. + if (o == null) { + o = super.get(key); + // if o is still unknownelement then change back to null + if ((o != null) && (o instanceof UnknownElement)) + o = null; + } } return o; }