git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270332 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -378,13 +378,12 @@ public class Java extends Task | |||||
| if( out == null ) | if( out == null ) | ||||
| { | { | ||||
| exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, | exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, | ||||
| Project.MSG_WARN ), | |||||
| null ); | |||||
| Project.MSG_WARN ) ); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| fos = new FileOutputStream( out ); | fos = new FileOutputStream( out ); | ||||
| exe = new Execute( new PumpStreamHandler( fos ), null ); | |||||
| exe = new Execute( new PumpStreamHandler( fos ) ); | |||||
| } | } | ||||
| if( dir == null ) | if( dir == null ) | ||||
| @@ -143,8 +143,7 @@ public class Patch extends Task | |||||
| } | } | ||||
| Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, | Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, | ||||
| Project.MSG_WARN ), | |||||
| null ); | |||||
| Project.MSG_WARN ) ); | |||||
| exe.setCommandline( toExecute.getCommandline() ); | exe.setCommandline( toExecute.getCommandline() ); | ||||
| try | try | ||||
| { | { | ||||
| @@ -140,7 +140,7 @@ public class Execute | |||||
| */ | */ | ||||
| public Execute() | public Execute() | ||||
| { | { | ||||
| this( new PumpStreamHandler(), null ); | |||||
| this( new PumpStreamHandler() ); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -149,7 +149,7 @@ public class Execute | |||||
| * @param streamHandler the stream handler used to handle the input and | * @param streamHandler the stream handler used to handle the input and | ||||
| * output streams of the subprocess. | * output streams of the subprocess. | ||||
| */ | */ | ||||
| public Execute( ExecuteStreamHandler streamHandler ) | |||||
| public Execute( final ExecuteStreamHandler streamHandler ) | |||||
| { | { | ||||
| this( streamHandler, null ); | this( streamHandler, null ); | ||||
| } | } | ||||
| @@ -320,7 +320,7 @@ public class Execute | |||||
| { | { | ||||
| m_watchdog.checkException(); | m_watchdog.checkException(); | ||||
| } | } | ||||
| return process.exitValue();; | |||||
| return process.exitValue(); | |||||
| } | } | ||||
| private CommandLauncher getLauncher() | private CommandLauncher getLauncher() | ||||
| @@ -229,7 +229,7 @@ public class ANTLR extends Task | |||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, | Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, | ||||
| Project.MSG_WARN ), null ); | |||||
| Project.MSG_WARN ) ); | |||||
| if( workingdir != null ) | if( workingdir != null ) | ||||
| { | { | ||||
| exe.setWorkingDirectory( workingdir ); | exe.setWorkingDirectory( workingdir ); | ||||
| @@ -187,7 +187,7 @@ public class Rpm extends Task | |||||
| streamhandler = new PumpStreamHandler( outputstream, errorstream ); | streamhandler = new PumpStreamHandler( outputstream, errorstream ); | ||||
| } | } | ||||
| Execute exe = new Execute( streamhandler, null ); | |||||
| Execute exe = new Execute( streamhandler ); | |||||
| if( topDir == null ) topDir = getBaseDirectory(); | if( topDir == null ) topDir = getBaseDirectory(); | ||||
| exe.setWorkingDirectory( topDir ); | exe.setWorkingDirectory( topDir ); | ||||
| @@ -203,7 +203,7 @@ public class NetCommand | |||||
| File dir = _owner.getBaseDirectory(); | File dir = _owner.getBaseDirectory(); | ||||
| ExecuteStreamHandler handler = new LogStreamHandler( _owner, | ExecuteStreamHandler handler = new LogStreamHandler( _owner, | ||||
| Project.MSG_INFO, Project.MSG_WARN ); | Project.MSG_INFO, Project.MSG_WARN ); | ||||
| _exe = new Execute( handler, null ); | |||||
| _exe = new Execute( handler ); | |||||
| _exe.setWorkingDirectory( dir ); | _exe.setWorkingDirectory( dir ); | ||||
| } | } | ||||
| }//class | }//class | ||||
| @@ -188,8 +188,7 @@ public class JJTree extends Task | |||||
| final Execute process = | final Execute process = | ||||
| new Execute( new LogStreamHandler( this, | new Execute( new LogStreamHandler( this, | ||||
| Project.MSG_INFO, | Project.MSG_INFO, | ||||
| Project.MSG_INFO ), | |||||
| null ); | |||||
| Project.MSG_INFO ) ); | |||||
| log( cmdl.toString(), Project.MSG_VERBOSE ); | log( cmdl.toString(), Project.MSG_VERBOSE ); | ||||
| process.setCommandline( cmdl.getCommandline() ); | process.setCommandline( cmdl.getCommandline() ); | ||||
| @@ -165,8 +165,7 @@ public abstract class P4Base extends org.apache.tools.ant.Task | |||||
| if( handler == null ) | if( handler == null ) | ||||
| handler = new SimpleP4OutputHandler( this ); | handler = new SimpleP4OutputHandler( this ); | ||||
| Execute exe = new Execute( handler, null ); | |||||
| final Execute exe = new Execute( handler ); | |||||
| exe.setCommandline( commandline.getCommandline() ); | exe.setCommandline( commandline.getCommandline() ); | ||||
| try | try | ||||
| @@ -378,13 +378,12 @@ public class Java extends Task | |||||
| if( out == null ) | if( out == null ) | ||||
| { | { | ||||
| exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, | exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, | ||||
| Project.MSG_WARN ), | |||||
| null ); | |||||
| Project.MSG_WARN ) ); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| fos = new FileOutputStream( out ); | fos = new FileOutputStream( out ); | ||||
| exe = new Execute( new PumpStreamHandler( fos ), null ); | |||||
| exe = new Execute( new PumpStreamHandler( fos ) ); | |||||
| } | } | ||||
| if( dir == null ) | if( dir == null ) | ||||
| @@ -143,8 +143,7 @@ public class Patch extends Task | |||||
| } | } | ||||
| Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, | Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, | ||||
| Project.MSG_WARN ), | |||||
| null ); | |||||
| Project.MSG_WARN ) ); | |||||
| exe.setCommandline( toExecute.getCommandline() ); | exe.setCommandline( toExecute.getCommandline() ); | ||||
| try | try | ||||
| { | { | ||||
| @@ -140,7 +140,7 @@ public class Execute | |||||
| */ | */ | ||||
| public Execute() | public Execute() | ||||
| { | { | ||||
| this( new PumpStreamHandler(), null ); | |||||
| this( new PumpStreamHandler() ); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -149,7 +149,7 @@ public class Execute | |||||
| * @param streamHandler the stream handler used to handle the input and | * @param streamHandler the stream handler used to handle the input and | ||||
| * output streams of the subprocess. | * output streams of the subprocess. | ||||
| */ | */ | ||||
| public Execute( ExecuteStreamHandler streamHandler ) | |||||
| public Execute( final ExecuteStreamHandler streamHandler ) | |||||
| { | { | ||||
| this( streamHandler, null ); | this( streamHandler, null ); | ||||
| } | } | ||||
| @@ -320,7 +320,7 @@ public class Execute | |||||
| { | { | ||||
| m_watchdog.checkException(); | m_watchdog.checkException(); | ||||
| } | } | ||||
| return process.exitValue();; | |||||
| return process.exitValue(); | |||||
| } | } | ||||
| private CommandLauncher getLauncher() | private CommandLauncher getLauncher() | ||||
| @@ -229,7 +229,7 @@ public class ANTLR extends Task | |||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, | Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, | ||||
| Project.MSG_WARN ), null ); | |||||
| Project.MSG_WARN ) ); | |||||
| if( workingdir != null ) | if( workingdir != null ) | ||||
| { | { | ||||
| exe.setWorkingDirectory( workingdir ); | exe.setWorkingDirectory( workingdir ); | ||||
| @@ -187,7 +187,7 @@ public class Rpm extends Task | |||||
| streamhandler = new PumpStreamHandler( outputstream, errorstream ); | streamhandler = new PumpStreamHandler( outputstream, errorstream ); | ||||
| } | } | ||||
| Execute exe = new Execute( streamhandler, null ); | |||||
| Execute exe = new Execute( streamhandler ); | |||||
| if( topDir == null ) topDir = getBaseDirectory(); | if( topDir == null ) topDir = getBaseDirectory(); | ||||
| exe.setWorkingDirectory( topDir ); | exe.setWorkingDirectory( topDir ); | ||||
| @@ -203,7 +203,7 @@ public class NetCommand | |||||
| File dir = _owner.getBaseDirectory(); | File dir = _owner.getBaseDirectory(); | ||||
| ExecuteStreamHandler handler = new LogStreamHandler( _owner, | ExecuteStreamHandler handler = new LogStreamHandler( _owner, | ||||
| Project.MSG_INFO, Project.MSG_WARN ); | Project.MSG_INFO, Project.MSG_WARN ); | ||||
| _exe = new Execute( handler, null ); | |||||
| _exe = new Execute( handler ); | |||||
| _exe.setWorkingDirectory( dir ); | _exe.setWorkingDirectory( dir ); | ||||
| } | } | ||||
| }//class | }//class | ||||
| @@ -188,8 +188,7 @@ public class JJTree extends Task | |||||
| final Execute process = | final Execute process = | ||||
| new Execute( new LogStreamHandler( this, | new Execute( new LogStreamHandler( this, | ||||
| Project.MSG_INFO, | Project.MSG_INFO, | ||||
| Project.MSG_INFO ), | |||||
| null ); | |||||
| Project.MSG_INFO ) ); | |||||
| log( cmdl.toString(), Project.MSG_VERBOSE ); | log( cmdl.toString(), Project.MSG_VERBOSE ); | ||||
| process.setCommandline( cmdl.getCommandline() ); | process.setCommandline( cmdl.getCommandline() ); | ||||
| @@ -165,8 +165,7 @@ public abstract class P4Base extends org.apache.tools.ant.Task | |||||
| if( handler == null ) | if( handler == null ) | ||||
| handler = new SimpleP4OutputHandler( this ); | handler = new SimpleP4OutputHandler( this ); | ||||
| Execute exe = new Execute( handler, null ); | |||||
| final Execute exe = new Execute( handler ); | |||||
| exe.setCommandline( commandline.getCommandline() ); | exe.setCommandline( commandline.getCommandline() ); | ||||
| try | try | ||||