maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r746003 - /maven/wagon/trunk/wagon-providers/wagon-ssh-external/src/main/java/org/apache/maven/wagon/providers/ssh/external/ScpExternalWagon.java
Date Thu, 19 Feb 2009 21:25:53 GMT
Author: bentmann
Date: Thu Feb 19 21:25:52 2009
New Revision: 746003

URL: http://svn.apache.org/viewvc?rev=746003&view=rev
Log:
o Fixed case-insensitive string handling (cf. http://maven.apache.org/plugin-developers/common-bugs.html#Handling_Strings_Case-insensitively)

Modified:
    maven/wagon/trunk/wagon-providers/wagon-ssh-external/src/main/java/org/apache/maven/wagon/providers/ssh/external/ScpExternalWagon.java

Modified: maven/wagon/trunk/wagon-providers/wagon-ssh-external/src/main/java/org/apache/maven/wagon/providers/ssh/external/ScpExternalWagon.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-ssh-external/src/main/java/org/apache/maven/wagon/providers/ssh/external/ScpExternalWagon.java?rev=746003&r1=746002&r2=746003&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-ssh-external/src/main/java/org/apache/maven/wagon/providers/ssh/external/ScpExternalWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-ssh-external/src/main/java/org/apache/maven/wagon/providers/ssh/external/ScpExternalWagon.java
Thu Feb 19 21:25:52 2009
@@ -22,6 +22,7 @@
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.util.List;
+import java.util.Locale;
 
 import org.apache.maven.wagon.AbstractWagon;
 import org.apache.maven.wagon.CommandExecutionException;
@@ -218,7 +219,7 @@
 
     protected boolean isPuTTY()
     {
-        return sshExecutable.toLowerCase().indexOf( "plink" ) >= 0;
+        return sshExecutable.toLowerCase( Locale.ENGLISH ).indexOf( "plink" ) >= 0;
     }
 
     private Commandline createBaseCommandLine( boolean putty, String executable, File privateKey
)
@@ -311,7 +312,8 @@
             int exitCode = CommandLineUtils.executeCommandLine( cl, null, err );
             if ( exitCode != 0 )
             {
-                if ( !put && err.getOutput().trim().toLowerCase().indexOf( "no such
file or directory" ) != -1 )
+                if ( !put && 
+                    err.getOutput().trim().toLowerCase( Locale.ENGLISH ).indexOf( "no such
file or directory" ) != -1 )
                 {
                     throw new ResourceDoesNotExistException( err.getOutput() );
                 }
@@ -336,7 +338,7 @@
 
     boolean isPuTTYSCP()
     {
-        return scpExecutable.toLowerCase().indexOf( "pscp" ) >= 0;
+        return scpExecutable.toLowerCase( Locale.ENGLISH ).indexOf( "pscp" ) >= 0;
     }
 
     private String normalizeResource( Resource resource )



---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-commits-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-commits-help@maven.apache.org


Mime
View raw message