continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r800613 - /continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
Date Mon, 03 Aug 2009 23:16:14 GMT
Author: ctan
Date: Mon Aug  3 23:16:13 2009
New Revision: 800613

URL: http://svn.apache.org/viewvc?rev=800613&view=rev
Log:
[CONTINUUM-2314] only hide password if protocol is http or https

Modified:
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java?rev=800613&r1=800612&r2=800613&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
Mon Aug  3 23:16:13 2009
@@ -234,38 +234,43 @@
     {
         String url = metadata.toExternalForm();
 
+        if ( metadata.getProtocol().startsWith( "http" ) )
+        {
+            url = hidePasswordInUrl( url );
+        }
+
         try
         {
             return createMetadataFile( metadata, username, password, result );
         }
         catch ( FileNotFoundException e )
         {
-            log.info( "URL not found: " + hidePasswordInUrl( url ), e );
+            log.info( "URL not found: " + url, e );
             result.addError( ContinuumProjectBuildingResult.ERROR_POM_NOT_FOUND );
         }
         catch ( MalformedURLException e )
         {
-            log.info( "Malformed URL: " + hidePasswordInUrl( url ), e );
+            log.info( "Malformed URL: " + url, e );
             result.addError( ContinuumProjectBuildingResult.ERROR_MALFORMED_URL );
         }
         catch ( URISyntaxException e )
         {
-            log.info( "Malformed URL: " + hidePasswordInUrl( url ), e );
+            log.info( "Malformed URL: " + url, e );
             result.addError( ContinuumProjectBuildingResult.ERROR_MALFORMED_URL );
         }
         catch ( UnknownHostException e )
         {
-            log.info( "Unknown host: " + hidePasswordInUrl( url ), e );
+            log.info( "Unknown host: " + url, e );
             result.addError( ContinuumProjectBuildingResult.ERROR_UNKNOWN_HOST );
         }
         catch ( IOException e )
         {
-            log.warn( "Could not download the URL: " + hidePasswordInUrl( url ), e );
+            log.warn( "Could not download the URL: " + url, e );
             result.addError( ContinuumProjectBuildingResult.ERROR_UNKNOWN );
         }
         catch ( HttpException e )
         {
-            log.warn( "Could not download the URL: " + hidePasswordInUrl( url ), e );
+            log.warn( "Could not download the URL: " + url, e );
             result.addError( ContinuumProjectBuildingResult.ERROR_UNKNOWN );
         }
         return null;



Mime
View raw message