commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r291050 - in /jakarta/commons/sandbox/exec/trunk/src: main/java/org/apache/commons/exec/ main/java/org/apache/commons/exec/environment/ main/java/org/apache/commons/exec/launcher/ test/java/org/apache/commons/exec/
Date Fri, 23 Sep 2005 00:35:52 GMT
Author: trygvis
Date: Thu Sep 22 17:35:36 2005
New Revision: 291050

URL: http://svn.apache.org/viewcvs?rev=291050&view=rev
Log:
Cleaning up a tad:
o Removing double empty lines.
o Fixing a couple of errornous javadoc tags that IDEA pointed out.

Modified:
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/CommandLineImpl.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/Exec.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteException.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/LogOutputStream.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/PumpStreamHandler.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/Watchdog.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/environment/Environment.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentVariable.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/environment/OpenVmsEnvironment.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncher.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherFactory.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherImpl.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherProxy.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/Java13CommandLauncher.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/OS2CommandLauncher.java
    jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java
    jakarta/commons/sandbox/exec/trunk/src/test/java/org/apache/commons/exec/CommandLineTest.java
    jakarta/commons/sandbox/exec/trunk/src/test/java/org/apache/commons/exec/TestUtil.java

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java
Thu Sep 22 17:35:36 2005
@@ -72,5 +72,4 @@
      * operation.
      */
     void clearArgs();
-
-}
\ No newline at end of file
+}

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/CommandLineImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/CommandLineImpl.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/CommandLineImpl.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/CommandLineImpl.java
Thu Sep 22 17:35:36 2005
@@ -33,6 +33,7 @@
 public class CommandLineImpl implements Cloneable, CommandLine {
 
     private static final String SINGLE_QUOTE = "\'";
+
     private static final String DOUBLE_QUOTE = "\"";
     
     /**
@@ -77,7 +78,6 @@
      * This method calls <code>this.createArgument(false)</code>.
      * </p>
      * 
-     * @see #createArgument(boolean)
      * @return the argument object.
      */
     private CommandLineArgument createArgument(final String value) {
@@ -86,9 +86,6 @@
         return argument;
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.commons.exec.CommandLineIn#setExecutable(java.lang.String)
-     */
     public void setExecutable(final String executable) {
         if (executable == null || executable.length() == 0) {
             return;
@@ -97,32 +94,20 @@
                 '\\', File.separatorChar);
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.commons.exec.CommandLineIn#getExecutable()
-     */
     public String getExecutable() {
         return executable;
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.commons.exec.CommandLineIn#addArguments(java.lang.String[])
-     */
     public void addArguments(final String[] line) {
         for (int i = 0; i < line.length; i++) {
             createArgument(line[i]);
         }
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.commons.exec.CommandLineIn#addArgument(java.lang.String)
-     */
     public void addArgument(final String arg) {
         createArgument(arg);
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.commons.exec.CommandLineIn#getCommandline()
-     */
     public String[] getCommandline() {
         List commands = new LinkedList();
         ListIterator list = commands.listIterator();
@@ -143,9 +128,6 @@
         addArgumentsToList(list);
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.commons.exec.CommandLineIn#getArguments()
-     */
     public String[] getArguments() {
         List result = new ArrayList(arguments.size() * 2);
         addArgumentsToList(result.listIterator());
@@ -327,17 +309,11 @@
         return c;
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.commons.exec.CommandLineIn#clear()
-     */
     public void clear() {
         executable = null;
         arguments.removeAllElements();
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.commons.exec.CommandLineIn#clearArgs()
-     */
     public void clearArgs() {
         arguments.removeAllElements();
     }

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/Exec.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/Exec.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/Exec.java (original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/Exec.java Thu
Sep 22 17:35:36 2005
@@ -339,10 +339,8 @@
      *             streams of the process
      */
     protected final void runExecute(final Execute exe) throws IOException {
-        int returnCode = -1; // assume the worst
-
         if (!spawn) {
-            returnCode = exe.execute();
+            int returnCode = exe.execute();
 
             // test for and handle a forced process death
             if (exe.killedProcess()) {
@@ -420,5 +418,4 @@
      */
     protected void logFlush() {
     }
-
 }

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteException.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteException.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteException.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteException.java
Thu Sep 22 17:35:36 2005
@@ -30,9 +30,7 @@
      * Construct a new exception with <code>null</code> as its detail message.
      */
     public ExecuteException() {
-
         super();
-
     }
 
     /**
@@ -42,9 +40,7 @@
      *            The detail message
      */
     public ExecuteException(final String message) {
-
         super(message);
-
     }
 
     /**
@@ -55,9 +51,7 @@
      *            The underlying cause
      */
     public ExecuteException(final Throwable cause) {
-
         this((cause == null) ? null : cause.toString(), cause);
-
     }
 
     /**
@@ -69,10 +63,8 @@
      *            The underlying cause
      */
     public ExecuteException(final String message, final Throwable cause) {
-
         super(message + " (Caused by " + cause + ")");
         this.cause = cause; // Two-argument version requires JDK 1.4 or later
-
     }
 
     /**
@@ -84,8 +76,6 @@
      * Return the underlying cause of this exception (if any).
      */
     public Throwable getCause() {
-
         return (this.cause);
-
     }
 }

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/LogOutputStream.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/LogOutputStream.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/LogOutputStream.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/LogOutputStream.java
Thu Sep 22 17:35:36 2005
@@ -53,8 +53,6 @@
     /**
      * Creates a new instance of this class.
      * 
-     * @param task
-     *            the task for whom to log
      * @param level
      *            loglevel used to log data written to this stream.
      */
@@ -168,5 +166,4 @@
             blockStartOffset = offset;
         }
     }
-
 }

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/PumpStreamHandler.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/PumpStreamHandler.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/PumpStreamHandler.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/PumpStreamHandler.java
Thu Sep 22 17:35:36 2005
@@ -237,5 +237,4 @@
         result.setDaemon(true);
         return result;
     }
-
 }

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/Watchdog.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/Watchdog.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/Watchdog.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/Watchdog.java
Thu Sep 22 17:35:36 2005
@@ -80,5 +80,4 @@
             fireTimeoutOccured();
         }
     }
-
 }

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/environment/Environment.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/environment/Environment.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/environment/Environment.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/environment/Environment.java
Thu Sep 22 17:35:36 2005
@@ -91,8 +91,6 @@
      * value
      */
     protected Environment(Map env) {
-        this();
-
         Set entries = env.entrySet();
         for (Iterator iter = entries.iterator(); iter.hasNext();) {
             Map.Entry entry = (Map.Entry) iter.next();
@@ -302,5 +300,4 @@
         }
         return bos.toString();
     }
-
 }

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentVariable.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentVariable.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentVariable.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentVariable.java
Thu Sep 22 17:35:36 2005
@@ -19,7 +19,6 @@
 
 import java.io.File;
 
-
 /**
  * representation of a single env value
  */

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/environment/OpenVmsEnvironment.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/environment/OpenVmsEnvironment.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/environment/OpenVmsEnvironment.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/environment/OpenVmsEnvironment.java
Thu Sep 22 17:35:36 2005
@@ -33,8 +33,10 @@
     private static final long serialVersionUID = 3762535598665117752L;
 
     protected OpenVmsEnvironment() {
-
     }
+/*
+ This method could not possibly be useful or called from anywhere as it will
+ simply just call itself and recurse infinitely.
 
     public static synchronized Environment getProcEnvironment() {
         Environment procEnvironment = getProcEnvironment();
@@ -54,7 +56,7 @@
 
         return procEnvironment;
     }
-
+*/
     protected static CommandLine getProcEnvCommand() {
         CommandLine commandLine = new CommandLineImpl();
         commandLine.setExecutable("show");

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncher.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncher.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncher.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncher.java
Thu Sep 22 17:35:36 2005
@@ -56,5 +56,4 @@
      */
     Process exec(final CommandLine cmd, final Environment env,
             final File workingDir) throws IOException;
-
-}
\ No newline at end of file
+}

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherFactory.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherFactory.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherFactory.java
Thu Sep 22 17:35:36 2005
@@ -22,7 +22,6 @@
 /**
  * Builds a command launcher for the OS and JVM we are running under.
  */
-
 public final class CommandLauncherFactory {
 
     private CommandLauncherFactory() {

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherImpl.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherImpl.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherImpl.java
Thu Sep 22 17:35:36 2005
@@ -29,12 +29,7 @@
  * working directory.
  */
 public abstract class CommandLauncherImpl implements CommandLauncher {
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.commons.exec.launcher.CommandLauncherIn#exec(java.lang.String[],
-     *      java.lang.String[])
-     */
+
     public Process exec(final CommandLine cmd, final Environment env)
             throws IOException {
         String[] envVar = null;
@@ -46,12 +41,6 @@
                 envVar);
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.commons.exec.launcher.CommandLauncherIn#exec(java.lang.String[],
-     *      java.lang.String[], java.io.File)
-     */
     public abstract Process exec(final CommandLine cmd, final Environment env,
             final File workingDir) throws IOException;
 }

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherProxy.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherProxy.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherProxy.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherProxy.java
Thu Sep 22 17:35:36 2005
@@ -38,8 +38,6 @@
      * Launches the given command in a new process. Delegates this method to the
      * proxied launcher
      * 
-     * @param project
-     *            the ant project
      * @param cmd
      *            the command line to execute as an array of strings
      * @param env
@@ -51,5 +49,4 @@
             throws IOException {
         return myLauncher.exec(cmd, env);
     }
-
 }

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/Java13CommandLauncher.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/Java13CommandLauncher.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/Java13CommandLauncher.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/Java13CommandLauncher.java
Thu Sep 22 17:35:36 2005
@@ -39,8 +39,6 @@
 	 * Launches the given command in a new process, in the given working
 	 * directory
 	 * 
-	 * @param project
-	 *            the ant project
 	 * @param cmd
 	 *            the command line to execute as an array of strings
 	 * @param env
@@ -58,9 +56,8 @@
 		if(env != null) {
 			envVars = env.getVariables();
 		}
-		
-		
-		return (Process) Runtime.getRuntime().exec(cmd.getCommandline(),
-				envVars, workingDir);
+
+		return Runtime.getRuntime().exec(cmd.getCommandline(),
+                envVars, workingDir);
 	}
 }

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/OS2CommandLauncher.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/OS2CommandLauncher.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/OS2CommandLauncher.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/OS2CommandLauncher.java
Thu Sep 22 17:35:36 2005
@@ -42,8 +42,6 @@
      * Launches the given command in a new process, in the given working
      * directory.
      * 
-     * @param project
-     *            the ant project
      * @param cmd
      *            the command line to execute as an array of strings
      * @param env

Modified: jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java
Thu Sep 22 17:35:36 2005
@@ -36,10 +36,6 @@
  */
 public class VmsCommandLauncher extends Java13CommandLauncher {
 
-    public VmsCommandLauncher() throws NoSuchMethodException {
-        super();
-    }
-
     /**
      * Launches the given command in a new process.
      */
@@ -104,5 +100,4 @@
         }
         return script;
     }
-
 }

Modified: jakarta/commons/sandbox/exec/trunk/src/test/java/org/apache/commons/exec/CommandLineTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/test/java/org/apache/commons/exec/CommandLineTest.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/test/java/org/apache/commons/exec/CommandLineTest.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/test/java/org/apache/commons/exec/CommandLineTest.java
Thu Sep 22 17:35:36 2005
@@ -58,5 +58,4 @@
         cmdl.addArgument("ba'r");
         assertEquals("test foo \"ba'r\"", cmdl.toString());
     }
-
 }

Modified: jakarta/commons/sandbox/exec/trunk/src/test/java/org/apache/commons/exec/TestUtil.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/exec/trunk/src/test/java/org/apache/commons/exec/TestUtil.java?rev=291050&r1=291049&r2=291050&view=diff
==============================================================================
--- jakarta/commons/sandbox/exec/trunk/src/test/java/org/apache/commons/exec/TestUtil.java
(original)
+++ jakarta/commons/sandbox/exec/trunk/src/test/java/org/apache/commons/exec/TestUtil.java
Thu Sep 22 17:35:36 2005
@@ -22,7 +22,6 @@
 public final class TestUtil {
 
     private TestUtil() {
-
     }
 
     public static String resolveScriptForOS(String script) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message