ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Ant.java
Date Thu, 03 Apr 2003 14:44:02 GMT
conor       2003/04/03 06:44:02

  Modified:    src/main/org/apache/tools/ant Project.java
               src/main/org/apache/tools/ant/taskdefs Ant.java
  Log:
  Fix up handling of input in nested builds.
  
  PR:	18642
  
  Revision  Changes    Path
  1.133     +13 -2     ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.132
  retrieving revision 1.133
  diff -u -w -u -r1.132 -r1.133
  --- Project.java	17 Feb 2003 14:12:10 -0000	1.132
  +++ Project.java	3 Apr 2003 14:44:01 -0000	1.133
  @@ -56,6 +56,7 @@
   
   import java.io.File;
   import java.io.IOException;
  +import java.io.EOFException;
   import java.io.InputStream;
   import java.lang.reflect.Modifier;
   import java.util.Enumeration;
  @@ -241,6 +242,16 @@
       }
       
       /**
  +     * Get this project's input stream
  +     *
  +     * @return the InputStream instance in use by this Porject instance to 
  +     * read input
  +     */
  +    public InputStream getDefaultInputStream() {
  +        return defaultInputStream;
  +    }
  +    
  +    /**
        * Retrieves the current input handler.
        *
        * @return the InputHandler instance currently in place for the project 
  @@ -1309,7 +1320,7 @@
           if (defaultInputStream != null) {
               return defaultInputStream.read(buffer, offset, length);
           } else {
  -            return System.in.read(buffer, offset, length);
  +            throw new EOFException("No input provided for project");
           }
       }
       
  
  
  
  1.76      +1 -0      ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
  
  Index: Ant.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -w -u -r1.75 -r1.76
  --- Ant.java	10 Feb 2003 14:13:34 -0000	1.75
  +++ Ant.java	3 Apr 2003 14:44:02 -0000	1.76
  @@ -150,6 +150,7 @@
        */
       public void init() {
           newProject = new Project();
  +        newProject.setDefaultInputStream(getProject().getDefaultInputStream());
           newProject.setJavaVersionProperty();
           newProject.addTaskDefinition("property",
                                        (Class) getProject().getTaskDefinitions()
  
  
  

Mime
View raw message