From: Olivier Lamy Date: Tue, 14 Jun 2011 08:48:36 +0000 (+0000) Subject: fix sonar issue : Inefficient use of keySet iterator instead of entrySet iterator X-Git-Tag: archiva-1.4-M1~647 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=80c3274cd3d5b08fb3f7e7c0664e28a07443b6e6;p=archiva.git fix sonar issue : Inefficient use of keySet iterator instead of entrySet iterator git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1135410 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AbstractProxyConnectorFormAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AbstractProxyConnectorFormAction.java index 57baffa58..1e6831196 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AbstractProxyConnectorFormAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AbstractProxyConnectorFormAction.java @@ -457,13 +457,13 @@ public abstract class AbstractProxyConnectorFormAction } Map properties = connector.getProperties(); - for ( String key : properties.keySet() ) + for ( Map.Entry entry2 : properties.entrySet()) { - Object value = properties.get( key ); + Object value = entry2.getValue(); if ( value.getClass().isArray() ) { String[] arr = (String[]) value; - properties.put( key, arr[0] ); + properties.put( entry2.getKey(), arr[0] ); } }