ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r988095 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/Project.java
Date Mon, 23 Aug 2010 11:57:37 GMT
Author: bodewig
Date: Mon Aug 23 11:57:37 2010
New Revision: 988095

URL: http://svn.apache.org/viewvc?rev=988095&view=rev
Log:
NPE in Project.setDefault.  PR 49803

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/Project.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=988095&r1=988094&r2=988095&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Mon Aug 23 11:57:37 2010
@@ -138,6 +138,10 @@ Fixed bugs:
    from a resource or string explicitly.
    Bugzilla Report 49587.
 
+ * Project#setDefault threw an excpetion when null was passed in as
+   argument, even though the javadoc says, null is a valid value.
+   Bugzilla Report 49803.
+
 Other changes:
 --------------
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/Project.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/Project.java?rev=988095&r1=988094&r2=988095&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/Project.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/Project.java Mon Aug 23 11:57:37 2010
@@ -729,7 +729,9 @@ public class Project implements Resource
      *                      no default target.
      */
     public void setDefault(String defaultTarget) {
-        setUserProperty(MagicNames.PROJECT_DEFAULT_TARGET, defaultTarget);
+        if (defaultTarget != null) {
+            setUserProperty(MagicNames.PROJECT_DEFAULT_TARGET, defaultTarget);
+        }
         this.defaultTarget = defaultTarget;
     }
 



Mime
View raw message