archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <br...@apache.org>
Subject Re: svn commit: r583630 - /maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java
Date Fri, 12 Oct 2007 09:47:48 GMT
I'll take a look.

On 11/10/2007, at 8:29 PM, Joakim Erdfelt wrote:

> You are right, it doesn't work.
> I can still get double repositories in the RepositoriesAction via  
> the web browser.
> And that line will not remove the double repositories. Added unit  
> test to show that.
> Open up archiva-configuration/src/test/java/org/apache/maven/ 
> archiva/configuration/ArchivaConfigurationTest.java
> and check out the /* commented */ XMLAssert's at the bottom of  
> the .testAutoDetectV1() method.
>
> - Joakim
>
> Brett Porter wrote:
>> Can you add a test to verify this?
>>
>> On 11/10/2007, at 12:15 AM, joakime@apache.org wrote:
>>
>>> Author: joakime
>>> Date: Wed Oct 10 15:15:51 2007
>>> New Revision: 583630
>>>
>>> URL: http://svn.apache.org/viewvc?rev=583630&view=rev
>>> Log:
>>> Eliminating duplicate repositories from showing up after the  
>>> conversion.
>>>
>>> Modified:
>>>     maven/archiva/trunk/archiva-base/archiva-configuration/src/ 
>>> main/java/org/apache/maven/archiva/configuration/ 
>>> DefaultArchivaConfiguration.java
>>>
>>> Modified: maven/archiva/trunk/archiva-base/archiva-configuration/ 
>>> src/main/java/org/apache/maven/archiva/configuration/ 
>>> DefaultArchivaConfiguration.java
>>> URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva- 
>>> base/archiva-configuration/src/main/java/org/apache/maven/archiva/ 
>>> configuration/DefaultArchivaConfiguration.java? 
>>> rev=583630&r1=583629&r2=583630&view=diff
>>> ==================================================================== 
>>> ==========
>>> --- maven/archiva/trunk/archiva-base/archiva-configuration/src/ 
>>> main/java/org/apache/maven/archiva/configuration/ 
>>> DefaultArchivaConfiguration.java (original)
>>> +++ maven/archiva/trunk/archiva-base/archiva-configuration/src/ 
>>> main/java/org/apache/maven/archiva/configuration/ 
>>> DefaultArchivaConfiguration.java Wed Oct 10 15:15:51 2007
>>> @@ -88,7 +88,7 @@
>>>       * Configuration Listeners we've registered.
>>>       */
>>>      private Set<ConfigurationListener> listeners = new  
>>> HashSet<ConfigurationListener>();
>>> -
>>> +
>>>      /**
>>>       * Registry Listeners we've registered.
>>>       */
>>> @@ -153,6 +153,9 @@
>>>                      config.addRemoteRepository( repo );
>>>                  }
>>>              }
>>> +
>>> +            // Prevent duplicate repositories from showing up.
>>> +            config.getRepositories().clear();
>>>          }
>>>
>>>          // Normalize the order fields in the proxy connectors.
>>> @@ -255,7 +258,7 @@
>>>
>>>          new ConfigurationRegistryWriter().write( configuration,  
>>> section );
>>>          section.save();
>>> -
>>> +
>>>          triggerEvent( ConfigurationEvent.SAVED );
>>>
>>>          this.configuration = processExpressions( configuration );
>>> @@ -278,8 +281,8 @@
>>>          try
>>>          {
>>>              ( (Initializable) registry ).initialize();
>>> -
>>> -            for ( RegistryListener regListener: registryListeners )
>>> +
>>> +            for ( RegistryListener regListener :  
>>> registryListeners )
>>>              {
>>>                  addRegistryChangeListener( regListener );
>>>              }
>>> @@ -288,7 +291,7 @@
>>>          {
>>>              throw new RegistryException( "Unable to reinitialize  
>>> configuration: " + e.getMessage(), e );
>>>          }
>>> -
>>> +
>>>          triggerEvent( ConfigurationEvent.SAVED );
>>>
>>>          return registry.getSection( KEY + ".user" );
>>> @@ -329,7 +332,7 @@
>>>
>>>          listeners.remove( listener );
>>>      }
>>> -
>>> +
>>>      public void addChangeListener( RegistryListener listener )
>>>      {
>>>          addRegistryChangeListener( listener );
>>> @@ -351,7 +354,6 @@
>>>              section.addChangeListener( listener );
>>>          }
>>>      }
>>> -
>>>
>>>      public void initialize()
>>>          throws InitializationException
>>>
>>
>> -- 
>> Brett Porter - brett@apache.org
>> Blog: http://www.devzuz.org/blogs/bporter/
>>
>
>
> -- 
> - Joakim Erdfelt
>  joakim@erdfelt.com
>  Open Source Software (OSS) Developer

--
Brett Porter - brett@apache.org
Blog: http://www.devzuz.org/blogs/bporter/


Mime
View raw message