]> source.dussan.org Git - archiva.git/commitdiff
use varargs from slf4j rather than creating an array for debug
authorOlivier Lamy <olamy@apache.org>
Wed, 14 Nov 2012 00:08:33 +0000 (00:08 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 14 Nov 2012 00:08:33 +0000 (00:08 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1409042 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/DebugTransferListener.java
archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java

index 19bd5937353f39707d9fc6b602f798aed77b0a95..d570ddeb7874436be39c94f7d86adb8226542d34 100644 (file)
@@ -23,8 +23,6 @@ import org.apache.maven.wagon.events.TransferListener;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.Arrays;
-
 /**
  * @author Olivier Lamy
  * @since 1.4-M1
@@ -60,10 +58,8 @@ public class DebugTransferListener
 
     public void transferError( TransferEvent transferEvent )
     {
-        log.debug( "transferError for resource {} on repository url {}",
-                   Arrays.asList( transferEvent.getResource().getName(),
-                                  transferEvent.getWagon().getRepository().getUrl() ).toArray( new String[2] ),
-                   transferEvent.getException() );
+        log.debug( "transferError for resource {} on repository url {}", transferEvent.getResource().getName(),
+                   transferEvent.getWagon().getRepository().getUrl(), transferEvent.getException() );
     }
 
     public void debug( String s )
index eb8053c6f1864a73c94a1cfb68f2bb2422b6db39..5cd8d6751de44d48d345dadb5425a0db91ddf5bc 100644 (file)
@@ -55,7 +55,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
@@ -261,8 +260,7 @@ public class DownloadRemoteIndexTask
 
         public void transferProgress( TransferEvent transferEvent, byte[] buffer, int length )
         {
-            log.debug( "transfer of {} : {}/{}",
-                       Arrays.asList( transferEvent.getResource().getName(), buffer.length, length ).toArray() );
+            log.debug( "transfer of {} : {}/{}", transferEvent.getResource().getName(), buffer.length, length );
         }
 
         public void transferCompleted( TransferEvent transferEvent )
@@ -275,9 +273,8 @@ public class DownloadRemoteIndexTask
 
         public void transferError( TransferEvent transferEvent )
         {
-            log.info( "error of transfer file {}: {}", Arrays.asList( transferEvent.getResource().getName(),
-                                                                      transferEvent.getException().getMessage() ).toArray(
-                new Object[2] ), transferEvent.getException() );
+            log.info( "error of transfer file {}: {}", transferEvent.getResource().getName(),
+                      transferEvent.getException().getMessage(), transferEvent.getException() );
         }
 
         public void debug( String message )