ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <n...@apache.org>
Subject Re: System Environment variables don't work
Date Thu, 17 May 2001 06:54:33 GMT
----- Original Message -----
From: "Mark Chamness" <markc@cacheware.com>
To: <ant-user@jakarta.apache.org>
Sent: Thursday, May 17, 2001 12:19 AM
Subject: RE: System Environment variables don't work


> Try this build file:
>
> build.xml
> ---------------------------------------------
> <project name="test" basedir="." default="test">
>         <property environment="env"/>
>         <target name="test">
>                 <echo message="test"/>
>         </target>
> </project>
> ---------------------------------------------
>

Stil no problem.

> org.apache.tools.ant.taskdefs.Property.loadEnvironment(Property.java: 248)

Can you please verify that you are using one of the nightly builds? Line 248
in the current version from CVS reads

247:                int pos = entry.indexOf('=');
248:                if (pos == -1) {
249:                    log("Ignoring: " + entry, Project.MSG_WARN);
250:                } else {
251:                    props.put(prefix + entry.substring(0, pos),
252:                              entry.substring(pos + 1));
253:                }

It seems that substring can never be called with an index of -1, doesn't it?

Nico



Mime
View raw message