Return-Path: Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Delivered-To: mailing list dev@ant.apache.org Received: (qmail 30853 invoked by uid 500); 26 Feb 2003 10:35:55 -0000 Received: (qmail 30850 invoked from network); 26 Feb 2003 10:35:55 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 26 Feb 2003 10:35:55 -0000 Received: (qmail 47998 invoked by uid 1146); 26 Feb 2003 10:35:54 -0000 Date: 26 Feb 2003 10:35:54 -0000 Message-ID: <20030226103554.47997.qmail@icarus.apache.org> From: bodewig@apache.org To: ant-cvs@apache.org Subject: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Input.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N bodewig 2003/02/26 02:35:53 Modified: src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH Input.java Log: Avoid NPE if input failed Revision Changes Path No revision No revision 1.11.2.3 +5 -4 ant/src/main/org/apache/tools/ant/taskdefs/Input.java Index: Input.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Input.java,v retrieving revision 1.11.2.2 retrieving revision 1.11.2.3 diff -u -r1.11.2.2 -r1.11.2.3 --- Input.java 10 Feb 2003 14:24:44 -0000 1.11.2.2 +++ Input.java 26 Feb 2003 10:35:53 -0000 1.11.2.3 @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2001-2002 The Apache Software Foundation. All rights + * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -123,7 +123,7 @@ } /** - * Actual test method executed by jakarta-ant. + * Actual method executed by jakarta-ant. * @exception BuildException */ public void execute () throws BuildException { @@ -137,8 +137,9 @@ getProject().getInputHandler().handleInput(request); - if (addproperty != null) { - project.setNewProperty(addproperty, request.getInput()); + String value = request.getInput(); + if (addproperty != null && value != null) { + project.setNewProperty(addproperty, value); } }