maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r759552 - in /maven/components/trunk: ./ maven-core/src/main/mdo/settings.mdo
Date Sat, 28 Mar 2009 19:02:38 GMT
Author: bentmann
Date: Sat Mar 28 19:02:38 2009
New Revision: 759552

URL: http://svn.apache.org/viewvc?rev=759552&view=rev
Log:
[MNG-2387] <active> on <proxy> in settings is misleading

o Merged from r747683

Modified:
    maven/components/trunk/   (props changed)
    maven/components/trunk/maven-core/src/main/mdo/settings.mdo

Propchange: maven/components/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Mar 28 19:02:38 2009
@@ -1,7 +1,7 @@
 /maven/components/branches/MNG-3932-1:746145-746157
 /maven/components/branches/maven-2.0.10-RC:680477
 /maven/components/branches/maven-2.0.x:679206,708871,720042,726541,727548,727998,728264,728940,729060,729738,729785,730631
-/maven/components/branches/maven-2.1.x:739385,741841,747468,748815,749612
+/maven/components/branches/maven-2.1.x:739385,741841,747468,747683,748815,749612
 /maven/components/branches/sisbell-plugin-manager:738973-739966
 /maven/components/sisbell-plugin-manager:738757-738972
 /maven/components/trunk:688587-696625,696644-699681

Modified: maven/components/trunk/maven-core/src/main/mdo/settings.mdo
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/mdo/settings.mdo?rev=759552&r1=759551&r2=759552&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/mdo/settings.mdo (original)
+++ maven/components/trunk/maven-core/src/main/mdo/settings.mdo Sat Mar 28 19:02:38 2009
@@ -292,28 +292,19 @@
      */
     public synchronized Proxy getActiveProxy()
     {
-        if(activeProxy == null)
+        if (activeProxy == null)
         {
-            java.util.List proxies = getProxies();
+            java.util.List<Proxy> 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 @@
           <name>active</name>
           <version>1.0.0</version>
           <required>false</required>
-          <defaultValue>false</defaultValue>
+          <defaultValue>true</defaultValue>
           <description>
             <![CDATA[
             Whether this proxy configuration is the active one.



Mime
View raw message