ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/rmic KaffeRmic.java SunRmic.java WLRmic.java
Date Fri, 13 Jul 2001 13:06:29 GMT
bodewig     01/07/13 06:06:28

  Modified:    src/main/org/apache/tools/ant/taskdefs/rmic KaffeRmic.java
                        SunRmic.java WLRmic.java
  Log:
  forgot to check a package for missing close() calls on LogOutputStreams.
  
  Revision  Changes    Path
  1.2       +4 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
  
  Index: KaffeRmic.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- KaffeRmic.java	2001/03/16 12:57:16	1.1
  +++ KaffeRmic.java	2001/07/13 13:06:14	1.2
  @@ -77,10 +77,10 @@
           PrintStream err = System.err;
           PrintStream out = System.out;
   
  +        // the project log
  +        PrintStream logstr = 
  +            new PrintStream(new LogOutputStream(getRmic(), Project.MSG_WARN));
           try {
  -            // the project log
  -            PrintStream logstr = 
  -                new PrintStream(new LogOutputStream(getRmic(), Project.MSG_WARN));
               System.setOut(logstr);
               System.setErr(logstr);
   
  @@ -106,6 +106,7 @@
           } finally {
               System.setErr(err);
               System.setOut(out);
  +            logstr.close();
           }
       }
   }
  
  
  
  1.2       +10 -4     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java
  
  Index: SunRmic.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SunRmic.java	2001/03/16 12:57:16	1.1
  +++ SunRmic.java	2001/07/13 13:06:16	1.2
  @@ -74,11 +74,11 @@
           getRmic().log("Using SUN rmic compiler", Project.MSG_VERBOSE);
           Commandline cmd = setupRmicCommand();
   
  -        try {
  -            // Create an instance of the rmic, redirecting output to
  -            // the project log
  -            OutputStream logstr = new LogOutputStream(getRmic(), Project.MSG_WARN);
  +        // Create an instance of the rmic, redirecting output to
  +        // the project log
  +        LogOutputStream logstr = new LogOutputStream(getRmic(), Project.MSG_WARN);
   
  +        try {
               Class c = Class.forName("sun.rmi.rmic.Main");
               Constructor cons = c.getConstructor(new Class[] 
                   { OutputStream.class, String.class });
  @@ -99,6 +99,12 @@
                   throw (BuildException) ex;
               } else {
                   throw new BuildException("Error starting SUN rmic: ", ex, getRmic().getLocation());
  +            }
  +        } finally {
  +            try {
  +                logstr.close();
  +            } catch (IOException e) {
  +                throw new BuildException(e);
               }
           }
       }
  
  
  
  1.3       +3 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java
  
  Index: WLRmic.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WLRmic.java	2001/05/03 11:35:20	1.2
  +++ WLRmic.java	2001/07/13 13:06:17	1.3
  @@ -78,9 +78,9 @@
           PrintStream err = System.err;
           PrintStream out = System.out;
   
  +        PrintStream logstr = 
  +            new PrintStream(new LogOutputStream(getRmic(), Project.MSG_WARN));
           try {
  -            PrintStream logstr = 
  -                new PrintStream(new LogOutputStream(getRmic(), Project.MSG_WARN));
               System.setOut(logstr);
               System.setErr(logstr);
   
  @@ -104,6 +104,7 @@
           } finally {
               System.setErr(err);
               System.setOut(out);
  +            logstr.close();
           }
       }
   
  
  
  

Mime
View raw message