diff --git a/maven-core/src/main/mdo/settings.mdo b/maven-core/src/main/mdo/settings.mdo index 99afcb914f..409054e5e5 100644 --- a/maven-core/src/main/mdo/settings.mdo +++ b/maven-core/src/main/mdo/settings.mdo @@ -292,28 +292,19 @@ */ public synchronized Proxy getActiveProxy() { - if(activeProxy == null) + if (activeProxy == null) { - java.util.List proxies = getProxies(); + java.util.List proxies = getProxies(); if ( proxies != null && !proxies.isEmpty() ) { - if ( proxies.size() > 1 ) + for ( Proxy proxy : proxies ) { - for ( java.util.Iterator it = proxies.iterator(); it.hasNext(); ) + if ( proxy.isActive() ) { - Proxy proxy = (Proxy) it.next(); - if ( proxy.isActive() ) - { - activeProxy = proxy; - break; - } + activeProxy = proxy; + break; } } - else - { - // If we only have one proxy, use it as the active one. - activeProxy = (Proxy) proxies.get( 0 ); - } } } @@ -464,7 +455,7 @@ active 1.0.0 false - false + true