Return-Path: Delivered-To: apmail-ant-notifications-archive@locus.apache.org Received: (qmail 66112 invoked from network); 30 Oct 2008 14:33:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Oct 2008 14:33:34 -0000 Received: (qmail 9222 invoked by uid 500); 30 Oct 2008 14:33:39 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 9206 invoked by uid 500); 30 Oct 2008 14:33:39 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 9197 invoked by uid 99); 30 Oct 2008 14:33:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Oct 2008 07:33:39 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Oct 2008 14:32:22 +0000 Received: by brutus.apache.org (Postfix, from userid 33) id 74FCF234C24E; Thu, 30 Oct 2008 07:33:02 -0700 (PDT) From: bugzilla@apache.org To: notifications@ant.apache.org Subject: DO NOT REPLY [Bug 4752] Make Ant report an error when an undefined property is referenced. X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: newchanged X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ant X-Bugzilla-Component: Core X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ville@oikarinen.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: notifications@ant.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Message-Id: <20081030143302.74FCF234C24E@brutus.apache.org> Date: Thu, 30 Oct 2008 07:33:02 -0700 (PDT) X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=4752 --- Comment #4 from Ville Oikarinen 2008-10-30 07:33:01 PST --- Thanks Matt, but we are not there yet. The apidoc at http://www.dpml.net/api/ant/1.6.4/org/apache/tools/ant/PropertyHelper.html#getUserProperty(java.lang.String, java.lang.String) seems to point at the method responsible for resolving a property. But the contract seems to be to return null for undefined properties. Maybe I should overrid this method like this: public java.lang.Object getUserProperty(java.lang.String ns, java.lang.String name) { Object retval = super.getUserProperty(ns,name); if(retval == null) throw new SomeException(); else return retval; } How will this contract violation work (now and in the future)? What should SomeException be? Etc. Seems that it's the caller's responsibility to handle null in a different way. Besides, the apidoc starts with "NOT FINAL. API MAY CHANGE". Doesn't sound like fun to customize this, does it :) -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.