commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r1741116 - /commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java
Date Tue, 26 Apr 2016 23:06:32 GMT
Author: woonsan
Date: Tue Apr 26 23:06:32 2016
New Revision: 1741116

URL: http://svn.apache.org/viewvc?rev=1741116&view=rev
Log:
fixing outdated example code in the javadoc of ExecuteWatchdog.java

Modified:
    commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java

Modified: commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java?rev=1741116&r1=1741115&r2=1741116&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java (original)
+++ commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java Tue
Apr 26 23:06:32 2016
@@ -25,10 +25,11 @@ import org.apache.commons.exec.util.Debu
  *
  * <pre>
  * ExecuteWatchdog watchdog = new ExecuteWatchdog(30000);
- * Executer exec = new Executer(myloghandler, watchdog);
- * exec.setCommandLine(mycmdline);
- * int exitvalue = exec.execute();
- * if (Execute.isFailure(exitvalue) &amp;&amp; watchdog.killedProcess()) {
+ * Executor executor = new DefaultExecutor();
+ * executor.setStreamHandler(new PumpStreamHandler());
+ * executor.setWatchdog(watchdog);
+ * int exitValue = executor.execute(myCommandLine);
+ * if (executor.isFailure(exitValue) &amp;&amp; watchdog.killedProcess()) {
  *     // it was killed on purpose by the watchdog
  * }
  * </pre>



Mime
View raw message