ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Chauvin <SChau...@cardiff.com>
Subject java.lang.NullPointerException in BaseFilterReader
Date Thu, 11 Jul 2002 18:49:50 GMT
Hi,
when running the following example under ANT 1.6 (copy from the
documentation):
<echo
  message="All these moments will be lost in time, like teardrops in the
${weather}"
  file="loadfile1.tmp"
  />
<property name="weather" value="rain" />
<loadfile property="modifiedmessage" srcFile="loadfile1.tmp">
  <filterchain>
    <filterreader
classname="org.apache.tools.ant.filters.ExpandProperties"/>
  </filterchain>
</loadfile>

I have this exception:
java.lang.NullPointerException
        at
org.apache.tools.ant.filters.ExpandProperties.read(ExpandProperties.j
ava:128)
        at
org.apache.tools.ant.filters.BaseFilterReader.read(BaseFilterReader.j
ava:123)
        at java.io.Reader.read(Reader.java:102)
        at org.apache.tools.ant.util.FileUtils.readFully(FileUtils.java:793)
        at
org.apache.tools.ant.filters.util.ChainReaderHelper.readFully(ChainRe
aderHelper.java:233)
        at org.apache.tools.ant.taskdefs.LoadFile.execute(LoadFile.java:194)
        at org.apache.tools.ant.Task.perform(Task.java:317)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
        at org.apache.tools.ant.Main.runBuild(Main.java:607)
        at org.apache.tools.ant.Main.start(Main.java:197)
        at org.apache.tools.ant.Main.main(Main.java:235)

It looks that the project is not set when using the classname loading. 
It works fine with the built-in filter (convenience method).
It may be a problem for customized filter readers.

Thanks,
Stephane

--
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