You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2007/02/12 18:06:39 UTC

DO NOT REPLY [Bug 41594] New: - Harden Ant to cope with null system properties

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41594>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41594

           Summary: Harden Ant to cope with null system properties
           Product: Ant
           Version: 1.7.0
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: robertdw@twasink.net


As Ant gets picked up and used embedded in other projects, it needs to have
better defensive checks. Currently, configuring a new Project instance fails
miserably if a System property is set to null (e.g. through bad code elsewhere).

To fix this, PropertyHelper.setProperty() needs a defensive null check for the
value parameter.

(PropertyHelper.setNewProperty() already has this check!)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 41594] - Harden Ant to cope with null system properties

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41594>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41594





------- Additional Comments From robertdw@twasink.net  2007-02-13 02:42 -------
Well, the setup code is from Tomcat, so it's available to be checked. See
http://svn.apache.org/repos/asf/tomcat/tc6.0.x/tags/TOMCAT_6_0_9/java/org/apache/jasper/compiler/AntCompiler.java
or
http://fisheye5.cenqua.com/browse/glassfish/appserv-webtier/src/java/org/apache/jasper/compiler/Compiler.java?r=1.10
for the version in Glassfish v1ur1.

As I noted in the bug report in Glassfish, this isn't really a bug in Ant, per
se; it's incredibly unlikely that there would be null System properties under
normal Ant usage. It's just that when other tools, such as Jasper, use Ant
embedded, the rules can change.

I used the "enhancement" priority precisely because this wasn't a bug in Ant.

If the Tomcat/Glassfish guys are doing something wrong, I'd appreciate it if you
can tell them what (or tell me, and I'll tell them). However, throwing an
exception in the init method isn't much more helpful than the NullPointerException.

(The long stack trace, BTW, is mostly due to the large number of web filters we
use, plus the Webwork stack trace. It can be reproduced without all the extra guff)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 41594] - Harden Ant to cope with null system properties

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41594>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41594


peterreilly@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.7.1




------- Additional Comments From peterreilly@apache.org  2007-02-12 09:43 -------
Added the check from setNewProperty
Thanks for the report


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 41594] - Harden Ant to cope with null system properties

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41594>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41594


stevel@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|1.7.1                       |---




------- Additional Comments From stevel@apache.org  2007-02-13 01:11 -------
Looking at the (long) stack trace, it would seem wise for Project.init() to
throw a buildexception if it is given null properties, as clearly the caller is
setting us up wrong.

-steve

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 41594] - Harden Ant to cope with null system properties

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41594>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41594





------- Additional Comments From robertdw@twasink.net  2007-02-12 09:08 -------
This issue was observed in a web project deployed in Glassfish. Glassfish uses
Jasper from Tomcat, and Jasper uses Ant to set up the classloader for JSP
compilation.

https://glassfish.dev.java.net/issues/show_bug.cgi?id=2286


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org