maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khmarba...@apache.org
Subject svn commit: r1752437 - in /maven/shared/trunk/maven-invoker/src: main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java
Date Wed, 13 Jul 2016 14:38:40 GMT
Author: khmarbaise
Date: Wed Jul 13 14:38:40 2016
New Revision: 1752437

URL: http://svn.apache.org/viewvc?rev=1752437&view=rev
Log:
[MINVOKER-207] Remove @Deprecated marked code

Modified:
    maven/shared/trunk/maven-invoker/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java
    maven/shared/trunk/maven-invoker/src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java

Modified: maven/shared/trunk/maven-invoker/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-invoker/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java?rev=1752437&r1=1752436&r2=1752437&view=diff
==============================================================================
--- maven/shared/trunk/maven-invoker/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java
(original)
+++ maven/shared/trunk/maven-invoker/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java
Wed Jul 13 14:38:40 2016
@@ -603,25 +603,6 @@ public class MavenCommandLineBuilder
         return mavenExecutable;
     }
 
-    /**
-     * Wraps a path with quotes to handle paths with spaces. If no spaces are found, the
original string is returned.
-     * 
-     * @param path string to wrap if containing spaces
-     * @return quote wrapped string
-     * @deprecated Quoting of command line arguments should be left to the Commandline from
plexus-utils.
-     */
-    public String wrapStringWithQuotes( String path )
-    {
-        if ( path.indexOf( " " ) > -1 )
-        {
-            return "\"" + path + "\"";
-        }
-        else
-        {
-            return path;
-        }
-    }
-
     private Properties getSystemEnvVars()
         throws IOException
     {

Modified: maven/shared/trunk/maven-invoker/src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-invoker/src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java?rev=1752437&r1=1752436&r2=1752437&view=diff
==============================================================================
--- maven/shared/trunk/maven-invoker/src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java
(original)
+++ maven/shared/trunk/maven-invoker/src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java
Wed Jul 13 14:38:40 2016
@@ -21,8 +21,6 @@ package org.apache.maven.shared.invoker;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -55,21 +53,6 @@ public class MavenCommandLineBuilderTest
     private Properties sysProps;
 
     @Test
-    public void testWrapwithQuotes()
-    {
-        TestCommandLineBuilder tcb = new TestCommandLineBuilder();
-        String test = "noSpacesInHere";
-
-        assertSame( test, tcb.wrapStringWithQuotes( test ) );
-        assertEquals( "noSpacesInHere", tcb.wrapStringWithQuotes( test ) );
-
-        test = "bunch of spaces in here";
-        assertNotSame( test, tcb.wrapStringWithQuotes( test ) );
-        assertEquals( "\"bunch of spaces in here\"", tcb.wrapStringWithQuotes( test ) );
-
-    }
-
-    @Test
     public void testShouldFailToSetLocalRepoLocationGloballyWhenItIsAFile()
         throws IOException
     {



Mime
View raw message