]> source.dussan.org Git - archiva.git/commitdiff
the id of ProxyConnectorRule is pattern AND type
authorOlivier Lamy <olamy@apache.org>
Tue, 2 Oct 2012 15:14:09 +0000 (15:14 +0000)
committerOlivier Lamy <olamy@apache.org>
Tue, 2 Oct 2012 15:14:09 +0000 (15:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1392959 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnectorrule/DefaultProxyConnectorRuleAdmin.java

index 10f954a67b463fe1b70d3072cc8c8eba712f69f3..d05c65a2f2b0fd7adc40194d99fb5639c3dd0ce2 100644 (file)
@@ -41,7 +41,7 @@ import java.util.List;
  * @author Olivier Lamy
  * @since 1.4-M3
  */
-@Service ( "proxyConnectorRuleAdmin#default" )
+@Service ("proxyConnectorRuleAdmin#default")
 public class DefaultProxyConnectorRuleAdmin
     extends AbstractRepositoryAdmin
     implements ProxyConnectorRuleAdmin
@@ -125,7 +125,9 @@ public class DefaultProxyConnectorRuleAdmin
 
         for ( ProxyConnectorRuleConfiguration proxyConnectorRuleConfiguration : configuration.getProxyConnectorRuleConfigurations() )
         {
-            if ( StringUtils.equals( proxyConnectorRuleConfiguration.getPattern(), proxyConnectorRule.getPattern() ) )
+            if ( StringUtils.equals( proxyConnectorRuleConfiguration.getPattern(), proxyConnectorRule.getPattern() )
+                && StringUtils.equals( proxyConnectorRuleConfiguration.getRuleType(),
+                                       proxyConnectorRule.getProxyConnectorRuleType().toString() ) )
             {
                 toSave = true;
             }
@@ -150,7 +152,9 @@ public class DefaultProxyConnectorRuleAdmin
 
         for ( ProxyConnectorRuleConfiguration proxyConnectorRuleConfiguration : configuration.getProxyConnectorRuleConfigurations() )
         {
-            if ( StringUtils.equals( proxyConnectorRuleConfiguration.getPattern(), proxyConnectorRule.getPattern() ) )
+            if ( StringUtils.equals( proxyConnectorRuleConfiguration.getPattern(), proxyConnectorRule.getPattern() )
+                && StringUtils.equals( proxyConnectorRuleConfiguration.getRuleType(),
+                                       proxyConnectorRule.getProxyConnectorRuleType().toString() ) )
             {
                 List<ProxyConnectorConfiguration> proxyConnectors =
                     new ArrayList<ProxyConnectorConfiguration>( proxyConnectorRule.getProxyConnectors().size() );