inprogress
[jalview.git] / forester / java / src / org / forester / util / SystemCommandExecutor.java
index bb87989..6160382 100644 (file)
@@ -38,7 +38,6 @@ import java.util.List;
 public class SystemCommandExecutor {
 
     private final List<String>    _command_information;
-    private final String          _admin_password;
     private ThreadedStreamHandler _input_stream_handler;
     private ThreadedStreamHandler _error_stream_handler;
     private final static boolean  DEBUG = false;
@@ -63,11 +62,10 @@ public class SystemCommandExecutor {
      */
     public SystemCommandExecutor( final List<String> command_information ) {
         if ( ( command_information == null ) || command_information.isEmpty() ) {
-            throw new IllegalArgumentException( "The commandInformation is required." );
+            throw new IllegalArgumentException( "command information is required" );
         }
         checkCmdFile( new File( command_information.get( 0 ) ) );
         _command_information = command_information;
-        _admin_password = null;
     }
 
     public static boolean isExecuteableFile( final File path_to_cmd_f ) {
@@ -114,9 +112,8 @@ public class SystemCommandExecutor {
             // these need to run as java threads to get the standard output and error from the command.
             // the inputstream handler gets a reference to our stdOutput in case we need to write
             // something to it, such as with the sudo command
-            _input_stream_handler = new ThreadedStreamHandler( inputStream, stdOutput, _admin_password );
+            _input_stream_handler = new ThreadedStreamHandler( inputStream, stdOutput );
             _error_stream_handler = new ThreadedStreamHandler( errorStream );
-            // TODO the inputStreamHandler has a nasty side-effect of hanging if the given password is wrong; fix it
             _input_stream_handler.start();
             _error_stream_handler.start();
             // TODO a better way to do this?
@@ -134,9 +131,9 @@ public class SystemCommandExecutor {
             // generated by process.waitFor() call
             throw e;
         }
-        //  finally {
+        // finally {
         return exit_value;
-        //  }
+        // }
     }
 
     /**