commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgoes...@apache.org
Subject svn commit: r726265 - in /commons/proper/exec/trunk/src: main/java/org/apache/commons/exec/environment/ main/java/org/apache/commons/exec/launcher/ test/java/org/apache/commons/exec/environment/ test/java/org/apache/commons/exec/util/
Date Sat, 13 Dec 2008 20:48:35 GMT
Author: sgoeschl
Date: Sat Dec 13 12:48:35 2008
New Revision: 726265

URL: http://svn.apache.org/viewvc?rev=726265&view=rev
Log:
[EXEC-27] finally renaming EnvironmentUtil to EnvironmentUtils

Added:
    commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentUtils.java
  (contents, props changed)
      - copied, changed from r726264, commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentUtil.java
Removed:
    commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentUtil.java
Modified:
    commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/DefaultProcessingEnvironment.java
    commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherImpl.java
    commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/Java13CommandLauncher.java
    commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/environment/EnvironmentUtilTest.java
    commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/util/MapUtilTest.java

Modified: commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/DefaultProcessingEnvironment.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/DefaultProcessingEnvironment.java?rev=726265&r1=726264&r2=726265&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/DefaultProcessingEnvironment.java
(original)
+++ commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/DefaultProcessingEnvironment.java
Sat Dec 13 12:48:35 2008
@@ -110,14 +110,14 @@
                 } else {
                     // New env var...append the previous one if we have it.
                     if (var != null) {
-                    	EnvironmentUtil.addVariableToEnvironment(procEnvironment, var);
+                    	EnvironmentUtils.addVariableToEnvironment(procEnvironment, var);
                     }
                     var = line;
                 }
             }
             // Since we "look ahead" before adding, there's one last env var.
             if (var != null) {
-            	EnvironmentUtil.addVariableToEnvironment(procEnvironment, var);
+            	EnvironmentUtils.addVariableToEnvironment(procEnvironment, var);
             }
         }
         return procEnvironment;

Copied: commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentUtils.java
(from r726264, commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentUtil.java)
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentUtils.java?p2=commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentUtils.java&p1=commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentUtil.java&r1=726264&r2=726265&rev=726265&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentUtil.java
(original)
+++ commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentUtils.java
Sat Dec 13 12:48:35 2008
@@ -27,7 +27,8 @@
 /**
  * Wrapper for environment variables.
  */
-public class EnvironmentUtil {
+public class EnvironmentUtils
+{
 
 	private static DefaultProcessingEnvironment procEnvironment;
 	
@@ -42,7 +43,7 @@
     /**
      * Disable constructor.
      */
-    private EnvironmentUtil() {
+    private EnvironmentUtils() {
 
     }
 

Propchange: commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/EnvironmentUtils.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherImpl.java?rev=726265&r1=726264&r2=726265&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherImpl.java
(original)
+++ commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/CommandLauncherImpl.java
Sat Dec 13 12:48:35 2008
@@ -23,7 +23,7 @@
 import java.util.Map;
 
 import org.apache.commons.exec.CommandLine;
-import org.apache.commons.exec.environment.EnvironmentUtil;
+import org.apache.commons.exec.environment.EnvironmentUtils;
 
 /**
  * A command launcher for a particular JVM/OS platform. This class is a general
@@ -34,7 +34,7 @@
 
     public Process exec(final CommandLine cmd, final Map env)
             throws IOException {
-        String[] envVar = EnvironmentUtil.toStrings(env);
+        String[] envVar = EnvironmentUtils.toStrings(env);
         return Runtime.getRuntime().exec(cmd.toStrings(), envVar);
     }
 

Modified: commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/Java13CommandLauncher.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/Java13CommandLauncher.java?rev=726265&r1=726264&r2=726265&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/Java13CommandLauncher.java
(original)
+++ commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/launcher/Java13CommandLauncher.java
Sat Dec 13 12:48:35 2008
@@ -23,7 +23,7 @@
 import java.util.Map;
 
 import org.apache.commons.exec.CommandLine;
-import org.apache.commons.exec.environment.EnvironmentUtil;
+import org.apache.commons.exec.environment.EnvironmentUtils;
 
 /**
  * A command launcher for JDK/JRE 1.3 (and higher). Uses the built-in
@@ -53,7 +53,7 @@
 	public Process exec(final CommandLine cmd, final Map env,
 			final File workingDir) throws IOException {
 
-		String[] envVars = EnvironmentUtil.toStrings(env);
+		String[] envVars = EnvironmentUtils.toStrings(env);
 
 		return Runtime.getRuntime().exec(cmd.toStrings(),
                 envVars, workingDir);

Modified: commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/environment/EnvironmentUtilTest.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/environment/EnvironmentUtilTest.java?rev=726265&r1=726264&r2=726265&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/environment/EnvironmentUtilTest.java
(original)
+++ commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/environment/EnvironmentUtilTest.java
Sat Dec 13 12:48:35 2008
@@ -32,16 +32,16 @@
 public class EnvironmentUtilTest extends TestCase {
 
     public void testToStrings() throws IOException {
-        TestUtil.assertEquals(null, EnvironmentUtil.toStrings(null), false);
+        TestUtil.assertEquals(null, EnvironmentUtils.toStrings(null), false);
 
         Map env = new HashMap();
 
-        TestUtil.assertEquals(new String[0], EnvironmentUtil.toStrings(env), false);
+        TestUtil.assertEquals(new String[0], EnvironmentUtils.toStrings(env), false);
 
         env.put("foo2", "bar2");
         env.put("foo", "bar");
 
-        String[] envStrings = EnvironmentUtil.toStrings(env);
+        String[] envStrings = EnvironmentUtils.toStrings(env);
 
         String[] expected = new String[]{"foo=bar", "foo2=bar2"};
 
@@ -55,11 +55,11 @@
      * java-gjc.
      */
     public void testGetProcEnvironment() throws IOException {
-        Map procEnvironment = EnvironmentUtil.getProcEnvironment();
+        Map procEnvironment = EnvironmentUtils.getProcEnvironment();
         // we assume that there is at least one environment variable
         // for this process
         assertTrue(procEnvironment.size() > 0);
-        String[] envArgs = EnvironmentUtil.toStrings(procEnvironment);
+        String[] envArgs = EnvironmentUtils.toStrings(procEnvironment);
         for(int i=0; i<envArgs.length; i++) {
             assertNotNull(envArgs[i]);
             assertTrue(envArgs[i].length() > 0);
@@ -79,7 +79,7 @@
         }
 
         // ensure that we have the same value for upper and lowercase keys
-        Map procEnvironment = EnvironmentUtil.getProcEnvironment();
+        Map procEnvironment = EnvironmentUtils.getProcEnvironment();
         for (Iterator it = procEnvironment.keySet().iterator(); it.hasNext();) {
             String variable = (String) it.next();
             String value = (String) procEnvironment.get(variable);
@@ -88,7 +88,7 @@
         }
 
         // add an environment variable and check access
-        EnvironmentUtil.addVariableToEnvironment( procEnvironment, "foo=bar" );
+        EnvironmentUtils.addVariableToEnvironment( procEnvironment, "foo=bar" );
         assertEquals("bar", procEnvironment.get("FOO"));
         assertEquals("bar", procEnvironment.get("Foo"));
         assertEquals("bar", procEnvironment.get("foo"));

Modified: commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/util/MapUtilTest.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/util/MapUtilTest.java?rev=726265&r1=726264&r2=726265&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/util/MapUtilTest.java
(original)
+++ commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/util/MapUtilTest.java
Sat Dec 13 12:48:35 2008
@@ -18,7 +18,7 @@
 
 package org.apache.commons.exec.util;
 
-import org.apache.commons.exec.environment.EnvironmentUtil;
+import org.apache.commons.exec.environment.EnvironmentUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -50,7 +50,7 @@
      */
     public void testMergeMap() throws Exception {
 
-        Map procEnvironment = EnvironmentUtil.getProcEnvironment();
+        Map procEnvironment = EnvironmentUtils.getProcEnvironment();
         HashMap applicationEnvironment = new HashMap();
 
         applicationEnvironment.put("appMainClass", "foo.bar.Main");



Mime
View raw message