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=6288>.
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=6288

NullPointerException if no environment variables found

           Summary: NullPointerException if no environment variables found
           Product: Ant
           Version: 1.4.1
          Platform: PC
        OS/Version: Windows 9x
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


If you have something like:

    <property environment="env"/>

to load all environment variables as ANT properties and ANT does not find any 
environment variables to load, you get a NullPointerException.  This did not 
happen in ANT 1.3.  The one-line fix is to add a protective "if" line at line 
191 in Execute.getProcEnvironment as follows:

            // Since we "look ahead" before adding, there's one last env var.
191 ==>     if (var != null)  // watch out for null if no env vars found
                procEnvironment.addElement(var);

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to