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 17396] New: - input task fails if 2 inputs redirected from a file
Date Tue, 25 Feb 2003 21:04:09 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=17396>.
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=17396

input task fails if 2 inputs redirected from a file

           Summary: input task fails if 2 inputs redirected from a file
           Product: Ant
           Version: 1.5.1
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: eric.ma@lucida.com


If we create 2 input tasks and then redirect stdin from a file, then the 2nd 
input task will fail.

Procedure to reproduce:
First, create 2 input tasks:
<target name="ema-test">
    <input
        message="input 1"
        addproperty="test.input1"
    />
    <echo message="result is ${test.input1}"/>
    <input
        message="input 2"
        addproperty="test.input2"
    />
    <echo message="result is ${test.input2}"/>
</target>

Then call the target by redirect input from a file:
ant -buildfile build.xml ema-test < input.txt

The content of input.txt is:
      1
      2
      3

Error Message:
ema-test:
input 1
result is 1
input 2

BUILD FAILED
java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:389)
        at org.apache.tools.ant.Project.setNewProperty(Project.java:460)
        at org.apache.tools.ant.taskdefs.Input.execute(Input.java:141)
        at org.apache.tools.ant.Task.perform(Task.java:319)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        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:610)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

Total time: 4 seconds
java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:389)
        at org.apache.tools.ant.Project.setNewProperty(Project.java:460)
        at org.apache.tools.ant.taskdefs.Input.execute(Input.java:141)
        at org.apache.tools.ant.Task.perform(Task.java:319)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        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:610)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

Mime
View raw message