ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 9886] - getProcEnvironment crashes when there's no environment
Date Fri, 14 Jun 2002 23:18:55 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9886>.
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=9886

getProcEnvironment crashes when there's no environment

vpatryshev@borland.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|incompatible with JDK 1.4   |getProcEnvironment crashes
                   |                            |when there's no environment



------- Additional Comments From vpatryshev@borland.com  2002-06-14 23:18 -------
I was wrong, SAX2 has nothing to do with that. It crashes because in my case the
vector returned by getProcEnvironment consists of one null string. This null
string gets there due to a bug in org.apache.tools.ant.taskdefs.Execute, line 191:

            // Since we "look ahead" before adding, there's one last env var.
            procEnvironment.addElement(var);

It should be like this:
            if (var != null) procEnvironment.addElement(var);

Now, why is it null? In general, there can be plenty of reasons. In my case it
was just that under 4nt (on Windows XP) command.com was not found. Stupid
enough, yes, but not enough to cause an exception.

Thanks,
Vlad

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


Mime
View raw message