From 4444ed0e1dd2a21682faca057ccdbb4e819bc16f Mon Sep 17 00:00:00 2001 From: Eric Barboni Date: Fri, 11 Apr 2014 23:16:01 +0200 Subject: [PATCH] simplify varargs calls --- .../apache/archiva/common/plexusbridge/PlexusSisuBridge.java | 2 +- .../org/apache/archiva/proxy/common/DefaultWagonFactory.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) mode change 100755 => 100644 archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/DefaultWagonFactory.java diff --git a/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/java/org/apache/archiva/common/plexusbridge/PlexusSisuBridge.java b/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/java/org/apache/archiva/common/plexusbridge/PlexusSisuBridge.java index d28b4495d..257b21689 100644 --- a/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/java/org/apache/archiva/common/plexusbridge/PlexusSisuBridge.java +++ b/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/java/org/apache/archiva/common/plexusbridge/PlexusSisuBridge.java @@ -122,7 +122,7 @@ public class PlexusSisuBridge Method method = classLoader.getClass().getMethod( "getURLs", new Class[]{ } ); if ( method != null ) { - return (URL[]) method.invoke( classLoader, null ); + return (URL[]) method.invoke( classLoader ); } } catch ( Exception e ) diff --git a/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/DefaultWagonFactory.java b/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/DefaultWagonFactory.java old mode 100755 new mode 100644 index da58f1c40..417435029 --- a/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/DefaultWagonFactory.java +++ b/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/DefaultWagonFactory.java @@ -53,6 +53,7 @@ public class DefaultWagonFactory this.applicationContext = applicationContext; } + @Override public Wagon getWagon( WagonFactoryRequest wagonFactoryRequest ) throws WagonFactoryException { @@ -85,9 +86,9 @@ public class DefaultWagonFactory try { Class clazz = wagon.getClass(); - Method getHttpHeaders = clazz.getMethod( "getHttpHeaders", null ); + Method getHttpHeaders = clazz.getMethod( "getHttpHeaders" ); - Properties headers = (Properties) getHttpHeaders.invoke( wagon, null ); + Properties headers = (Properties) getHttpHeaders.invoke( wagon ); if ( headers == null ) { headers = new Properties(); -- 2.39.5