You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2013/12/28 15:24:26 UTC

svn commit: r1553834 - in /commons/proper/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/

Author: ggregory
Date: Sat Dec 28 14:24:25 2013
New Revision: 1553834

URL: http://svn.apache.org/r1553834
Log:
Fix some funky formating.

Modified:
    commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java
    commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java
    commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/OpenVmsProcessingEnvironment.java
    commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java
    commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/CommandLineTest.java
    commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java
    commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/TutorialTest.java

Modified: commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java?rev=1553834&r1=1553833&r2=1553834&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java (original)
+++ commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java Sat Dec 28 14:24:25 2013
@@ -151,7 +151,7 @@ public class CommandLine {
      *
      * @return true if a file was used for setting the executable 
      */
-    public boolean isFile(){
+    public boolean isFile() {
         return isFile;
     }
 

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=1553834&r1=1553833&r2=1553834&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 Sat Dec 28 14:24:25 2013
@@ -213,7 +213,7 @@ public class ExecuteWatchdog implements 
         process = null;
     }
 
-    void setProcessNotStarted(){
+    void setProcessNotStarted() {
         processStarted = false;
     }
 
@@ -221,8 +221,8 @@ public class ExecuteWatchdog implements 
      * Ensures that the process is started, so we do not race with asynch execution.
      * The caller of this method must be holding the lock on this
      */
-    private void ensureStarted(){
-        while (!processStarted){
+    private void ensureStarted() {
+        while (!processStarted) {
             try {
                 this.wait();
             } catch (final InterruptedException e) {

Modified: commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/OpenVmsProcessingEnvironment.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/OpenVmsProcessingEnvironment.java?rev=1553834&r1=1553833&r2=1553834&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/OpenVmsProcessingEnvironment.java (original)
+++ commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/OpenVmsProcessingEnvironment.java Sat Dec 28 14:24:25 2013
@@ -74,7 +74,7 @@ public class OpenVmsProcessingEnvironmen
         while ((line = in.readLine()) != null) {
             final String SEP = "=="; // global symbol separator
             final int sepidx = line.indexOf(SEP);
-            if (sepidx > 0){
+            if (sepidx > 0) {
                 final String name = line.substring(0, sepidx).trim();
                 String value = line.substring(sepidx+SEP.length()).trim();
                 value = value.substring(1,value.length()-1); // drop enclosing quotes

Modified: commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java?rev=1553834&r1=1553833&r2=1553834&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java (original)
+++ commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java Sat Dec 28 14:24:25 2013
@@ -95,7 +95,7 @@ public class VmsCommandLauncher extends 
                     out.println('\"');
                     String value = (String) entry.getValue();
                     // Any embedded " values need to be doubled
-                    if (value.indexOf('\"') > 0){
+                    if (value.indexOf('\"') > 0) {
                         final StringBuffer sb = new StringBuffer();
                         for (int i = 0; i < value.length(); i++) {
                             final char c = value.charAt(i);
@@ -112,7 +112,7 @@ public class VmsCommandLauncher extends 
             }
 
             final String command = cmd.getExecutable();
-            if (cmd.isFile()){// We assume it is it a script file
+            if (cmd.isFile()) {// We assume it is it a script file
                 out.print("$ @");
                 // This is a bit crude, but seems to work
                 final String parts[] = StringUtils.split(command,"/");
@@ -120,7 +120,7 @@ public class VmsCommandLauncher extends 
                 out.print(":[");
                 out.print(parts[1]); // top level directory
                 final int lastPart = parts.length-1;
-                for(int i=2; i< lastPart; i++){
+                for(int i=2; i< lastPart; i++) {
                     out.print(".");
                     out.print(parts[i]);
                 }

Modified: commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/CommandLineTest.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/CommandLineTest.java?rev=1553834&r1=1553833&r2=1553834&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/CommandLineTest.java (original)
+++ commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/CommandLineTest.java Sat Dec 28 14:24:25 2013
@@ -408,7 +408,7 @@ public class CommandLineTest extends Tes
         assertEquals("\"C:\\Document And Settings\\documents\\432432.pdf\"", result[3]);                
     }
 
-    public void testCommandLineParsingWithExpansion3(){
+    public void testCommandLineParsingWithExpansion3() {
         final CommandLine cmdl = CommandLine.parse("AcroRd32.exe");
         cmdl.addArgument("/p");
         cmdl.addArgument("/h");

Modified: commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java?rev=1553834&r1=1553833&r2=1553834&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java (original)
+++ commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java Sat Dec 28 14:24:25 2013
@@ -264,7 +264,7 @@ public class DefaultExecutorTest extends
      */
     public void testExecuteWatchdogSync() throws Exception {
 
-        if (OS.isFamilyOpenVms()){
+        if (OS.isFamilyOpenVms()) {
             System.out.println("The test 'testExecuteWatchdogSync' currently hangs on the following OS : "
                     + System.getProperty("os.name"));
             return;

Modified: commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/TutorialTest.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/TutorialTest.java?rev=1553834&r1=1553833&r2=1553834&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/TutorialTest.java (original)
+++ commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/TutorialTest.java Sat Dec 28 14:24:25 2013
@@ -135,7 +135,7 @@ public class TutorialTest extends TestCa
             System.out.println("[resultHandler] The document was successfully printed ...");
         }
 
-        public void onProcessFailed(final ExecuteException e){
+        public void onProcessFailed(final ExecuteException e) {
             super.onProcessFailed(e);
             if(watchdog != null && watchdog.killedProcess()) {
                 System.err.println("[resultHandler] The print process timed out");