continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r800611 - /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:08:12 GMT
Author: ctan
Date: Mon Aug  3 23:08:12 2009
New Revision: 800611

URL: http://svn.apache.org/viewvc?rev=800611&view=rev
Log:
[CONTINUUM-2314] hide password in url when adding project fails

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=800611&r1=800610&r2=800611&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:08:12 2009
@@ -232,38 +232,40 @@
     protected File createMetadataFile( ContinuumProjectBuildingResult result, URL metadata,
String username,
                                        String password )
     {
+        String url = metadata.toExternalForm();
+
         try
         {
             return createMetadataFile( metadata, username, password, result );
         }
         catch ( FileNotFoundException e )
         {
-            log.info( "URL not found: " + metadata, e );
+            log.info( "URL not found: " + hidePasswordInUrl( url ), e );
             result.addError( ContinuumProjectBuildingResult.ERROR_POM_NOT_FOUND );
         }
         catch ( MalformedURLException e )
         {
-            log.info( "Malformed URL: " + metadata, e );
+            log.info( "Malformed URL: " + hidePasswordInUrl( url ), e );
             result.addError( ContinuumProjectBuildingResult.ERROR_MALFORMED_URL );
         }
         catch ( URISyntaxException e )
         {
-            log.info( "Malformed URL: " + metadata, e );
+            log.info( "Malformed URL: " + hidePasswordInUrl( url ), e );
             result.addError( ContinuumProjectBuildingResult.ERROR_MALFORMED_URL );
         }
         catch ( UnknownHostException e )
         {
-            log.info( "Unknown host: " + metadata, e );
+            log.info( "Unknown host: " + hidePasswordInUrl( url ), e );
             result.addError( ContinuumProjectBuildingResult.ERROR_UNKNOWN_HOST );
         }
         catch ( IOException e )
         {
-            log.warn( "Could not download the URL: " + metadata, e );
+            log.warn( "Could not download the URL: " + hidePasswordInUrl( url ), e );
             result.addError( ContinuumProjectBuildingResult.ERROR_UNKNOWN );
         }
         catch ( HttpException e )
         {
-            log.warn( "Could not download the URL: " + metadata, e );
+            log.warn( "Could not download the URL: " + hidePasswordInUrl( url ), e );
             result.addError( ContinuumProjectBuildingResult.ERROR_UNKNOWN );
         }
         return null;



Mime
View raw message