You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ja...@apache.org on 2008/08/13 08:39:07 UTC

svn commit: r685462 - /maven/sandbox/trunk/mercury/mercury-transport/mercury-transport-http/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalTarget.java

Author: janb
Date: Tue Aug 12 23:39:07 2008
New Revision: 685462

URL: http://svn.apache.org/viewvc?rev=685462&view=rev
Log:
More debug to diagnose windows problem.

Modified:
    maven/sandbox/trunk/mercury/mercury-transport/mercury-transport-http/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalTarget.java

Modified: maven/sandbox/trunk/mercury/mercury-transport/mercury-transport-http/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalTarget.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/mercury/mercury-transport/mercury-transport-http/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalTarget.java?rev=685462&r1=685461&r2=685462&view=diff
==============================================================================
--- maven/sandbox/trunk/mercury/mercury-transport/mercury-transport-http/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalTarget.java (original)
+++ maven/sandbox/trunk/mercury/mercury-transport/mercury-transport-http/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalTarget.java Tue Aug 12 23:39:07 2008
@@ -39,6 +39,7 @@
 import org.apache.maven.mercury.spi.http.client.HttpClientException;
 import org.apache.maven.mercury.spi.http.validate.Validator;
 import org.apache.maven.mercury.transport.api.Binding;
+import org.apache.maven.mercury.transport.api.Server;
 import org.mortbay.jetty.client.HttpExchange;
 
 
@@ -61,6 +62,7 @@
     protected int _checksumState;
     protected int _targetState;
     
+   
     protected HttpClientException _exception;
     protected Binding _binding;
     protected File _tempFile;
@@ -92,6 +94,7 @@
         {
             throw new IllegalArgumentException( "Nothing to retrieve" );
         }
+      
         _retriever = retriever;
         _binding = binding;
         _validators = validators;
@@ -161,7 +164,11 @@
     public boolean move()
     {
         if (_binding.isFile())
-            return _tempFile.renameTo( _binding.getLocalFile() );
+        {
+            boolean ok = _tempFile.renameTo( _binding.getLocalFile() );
+            System.err.println("Renaming "+_tempFile.getAbsolutePath()+" to "+_binding.getLocalFile().getAbsolutePath()+": "+ok);
+            return ok;
+        }
         else
             return true;
     }
@@ -454,7 +461,9 @@
     {
         if ( _tempFile != null && _tempFile.exists() )
         {
-            return _tempFile.delete();
+            boolean ok = _tempFile.delete();
+            System.err.println("Deleting "+_tempFile.getAbsolutePath()+" : "+ok);
+            return ok;
         }
         return false;
     }