]> source.dussan.org Git - archiva.git/commitdiff
follow code format no other changes
authorOlivier Lamy <olamy@apache.org>
Fri, 29 Jun 2012 11:56:35 +0000 (11:56 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 29 Jun 2012 11:56:35 +0000 (11:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1355331 13f79535-47bb-0310-9956-ffa450edef68

16 files changed:
archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ArchivaConfiguration.java
archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ConfigurationEvent.java
archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java
archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileTypes.java
archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/InvalidConfigurationException.java
archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/MavenProxyPropertyLoader.java
archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/FiletypeSelectionPredicate.java
archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/FiletypeToMapClosure.java
archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/NetworkProxyComparator.java
archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/NetworkProxySelectionPredicate.java
archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparator.java
archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/ProxyConnectorSelectionPredicate.java
archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/FileTypesTest.java
archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/LegacyArtifactPathTest.java
archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java
archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/RepositoryConfigurationComparatorTest.java

index 758605f14c1d4cfb34b817ef193cdb695d8d50bb..3a259da85501c05954aaf8b4f0ed4f90f35af933 100644 (file)
@@ -45,13 +45,13 @@ public interface ArchivaConfiguration
      */
     void save( Configuration configuration )
         throws RegistryException, IndeterminateConfigurationException;
-    
+
     /**
      * Determines if the configuration in use was as a result of a defaulted configuration.
-     * 
+     *
      * @return true if the configuration was created from the default-archiva.xml as opposed
-     *              to being loaded from the usual locations of ${user.home}/.m2/archiva.xml or
-     *              ${appserver.base}/conf/archiva.xml
+     *         to being loaded from the usual locations of ${user.home}/.m2/archiva.xml or
+     *         ${appserver.base}/conf/archiva.xml
      */
     boolean isDefaulted();
 
@@ -61,24 +61,25 @@ public interface ArchivaConfiguration
      * @param listener the listener
      */
     void addListener( ConfigurationListener listener );
-    
+
     /**
      * Remove a configuration listener to stop notifications of changes to the configuration.
      *
      * @param listener the listener
      */
     void removeListener( ConfigurationListener listener );
-    
+
     /**
      * Add a registry listener to notify of events in plexus-registry.
      *
      * @param listener the listener
-     * TODO: Remove in future.
+     *                 TODO: Remove in future.
      */
     void addChangeListener( RegistryListener listener );
 
     /**
      * reload configuration from file included registry
+     *
      * @since 1.4-M1
      */
     void reload();
index d0286f7e2f6e8e72b02161fa3e7d9fb94081c121..7d867394abd639cc389aa078049e506a1dc4f714 100644 (file)
@@ -29,21 +29,21 @@ import org.apache.archiva.policies.DownloadErrorPolicy;
 import org.apache.archiva.policies.Policy;
 import org.apache.archiva.policies.PostDownloadPolicy;
 import org.apache.archiva.policies.PreDownloadPolicy;
+import org.apache.archiva.redback.components.evaluator.DefaultExpressionEvaluator;
 import org.apache.archiva.redback.components.evaluator.EvaluatorException;
+import org.apache.archiva.redback.components.evaluator.ExpressionEvaluator;
+import org.apache.archiva.redback.components.evaluator.sources.SystemPropertyExpressionSource;
 import org.apache.archiva.redback.components.registry.Registry;
 import org.apache.archiva.redback.components.registry.RegistryException;
 import org.apache.archiva.redback.components.registry.RegistryListener;
 import org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry;
+import org.apache.archiva.redback.components.springutils.ComponentContainer;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.ListUtils;
 import org.apache.commons.collections.MapUtils;
 import org.apache.commons.configuration.BaseConfiguration;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
-import org.apache.archiva.redback.components.evaluator.DefaultExpressionEvaluator;
-import org.apache.archiva.redback.components.evaluator.ExpressionEvaluator;
-import org.apache.archiva.redback.components.evaluator.sources.SystemPropertyExpressionSource;
-import org.apache.archiva.redback.components.springutils.ComponentContainer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
index 886156cf11444d690246330a2f6d815b22a69a65..4e7eff49588e1976a34084ba9e9daf9fc70d47d8 100644 (file)
@@ -23,13 +23,13 @@ import org.apache.archiva.common.FileTypeUtils;
 import org.apache.archiva.configuration.functors.FiletypeSelectionPredicate;
 import org.apache.archiva.configuration.io.registry.ConfigurationRegistryReader;
 import org.apache.archiva.redback.components.registry.Registry;
+import org.apache.archiva.redback.components.registry.RegistryException;
 import org.apache.archiva.redback.components.registry.RegistryListener;
+import org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.Predicate;
 import org.apache.commons.configuration.CombinedConfiguration;
 import org.apache.tools.ant.types.selectors.SelectorUtils;
-import org.apache.archiva.redback.components.registry.RegistryException;
-import org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.PostConstruct;
index f93c646acae924d2fdf2a74bfeb5a847edff9212..5738af8ccb64d178e7bd125139deed6ba6916d1a 100644 (file)
@@ -19,9 +19,9 @@ package org.apache.archiva.configuration;
  * under the License.
  */
 
-import org.apache.commons.lang.StringUtils;
 import org.apache.archiva.policies.ReleasesPolicy;
 import org.apache.archiva.policies.SnapshotsPolicy;
+import org.apache.commons.lang.StringUtils;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -111,7 +111,7 @@ public class MavenProxyPropertyLoader
         }
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings( "unchecked" )
     private Properties getSubset( Properties props, String prefix )
     {
         Enumeration keys = props.keys();
index 33bd48581e4b4ce9edd64459db090f0c88cee86d..9238674dd6cc6f460abb1f4f8b86fa477a4956c6 100644 (file)
@@ -19,12 +19,12 @@ package org.apache.archiva.configuration.functors;
  * under the License.
  */
 
+import org.apache.archiva.configuration.FileType;
 import org.apache.commons.collections.Predicate;
 import org.apache.commons.lang.StringUtils;
-import org.apache.archiva.configuration.FileType;
 
 /**
- * FiletypeSelectionPredicate 
+ * FiletypeSelectionPredicate
  *
  * @version $Id$
  */
index 3544f2269a07dfd3b1f4bcf051c4be5808ac26b3..498421b1d618323c03b25b75a64c69504fba8cd5 100644 (file)
@@ -19,14 +19,14 @@ package org.apache.archiva.configuration.functors;
  * under the License.
  */
 
-import org.apache.commons.collections.Closure;
 import org.apache.archiva.configuration.FileType;
+import org.apache.commons.collections.Closure;
 
 import java.util.HashMap;
 import java.util.Map;
 
 /**
- * FiletypeToMapClosure 
+ * FiletypeToMapClosure
  *
  * @version $Id$
  */
index b0ebff096dc56b93c649f5ea77e8861afb592725..3bf8bf44cf0854ea6af406326635df01d6938830 100644 (file)
@@ -19,12 +19,12 @@ package org.apache.archiva.configuration.functors;
  * under the License.
  */
 
+import org.apache.archiva.configuration.NetworkProxyConfiguration;
 import org.apache.commons.collections.Predicate;
 import org.apache.commons.lang.StringUtils;
-import org.apache.archiva.configuration.NetworkProxyConfiguration;
 
 /**
- * NetworkProxySelectionPredicate 
+ * NetworkProxySelectionPredicate
  *
  * @version $Id$
  */
index bcde0ae44b590d889f6497215b10cb486e624020..cf9eda863ea9ab12bc24852a24bcfff184aba4ab 100644 (file)
@@ -24,16 +24,15 @@ import org.apache.archiva.configuration.ProxyConnectorConfiguration;
 import java.util.Comparator;
 
 /**
- * @deprecated
- * ProxyConnectorConfigurationOrderComparator 
- *
  * @version $Id$
+ * @deprecated ProxyConnectorConfigurationOrderComparator
  */
 public class ProxyConnectorConfigurationOrderComparator
     implements Comparator<ProxyConnectorConfiguration>
 {
-    private static ProxyConnectorConfigurationOrderComparator INSTANCE = new ProxyConnectorConfigurationOrderComparator();
-    
+    private static ProxyConnectorConfigurationOrderComparator INSTANCE =
+        new ProxyConnectorConfigurationOrderComparator();
+
     public int compare( ProxyConnectorConfiguration o1, ProxyConnectorConfiguration o2 )
     {
         if ( o1 == null && o2 == null )
@@ -57,7 +56,7 @@ public class ProxyConnectorConfigurationOrderComparator
         {
             return 1;
         }
-        
+
         if ( o1.getOrder() != 0 && o2.getOrder() == 0 )
         {
             return -1;
index 1da1b7313b994b8217254f76235eebd2d0812c37..6a4a94ccf38fe9bc8cc01d3d7bd9dbe6cdbf405d 100644 (file)
@@ -19,12 +19,13 @@ package org.apache.archiva.configuration.functors;
  * under the License.
  */
 
+import org.apache.archiva.configuration.ProxyConnectorConfiguration;
 import org.apache.commons.collections.Predicate;
 import org.apache.commons.lang.StringUtils;
-import org.apache.archiva.configuration.ProxyConnectorConfiguration;
 
 /**
  * ProxyConnectorPredicate
+ *
  * @version $Id$
  */
 public class ProxyConnectorSelectionPredicate
@@ -47,8 +48,8 @@ public class ProxyConnectorSelectionPredicate
         if ( object instanceof ProxyConnectorConfiguration )
         {
             ProxyConnectorConfiguration connector = (ProxyConnectorConfiguration) object;
-            return ( StringUtils.equals( sourceId, connector.getSourceRepoId() ) && StringUtils
-                .equals( targetId, connector.getTargetRepoId() ) );
+            return ( StringUtils.equals( sourceId, connector.getSourceRepoId() ) && StringUtils.equals( targetId,
+                                                                                                        connector.getTargetRepoId() ) );
         }
 
         return satisfies;
index e61498e11e4dc7f063a1f88046436d24bed795f7..4689a1774b04c330be11de3d6419e29785885500 100644 (file)
@@ -28,7 +28,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 import javax.inject.Inject;
 
 @RunWith( SpringJUnit4ClassRunner.class )
-@ContextConfiguration( locations = {"classpath*:/META-INF/spring-context.xml"} )
+@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml" } )
 public class FileTypesTest
     extends TestCase
 {
@@ -67,13 +67,20 @@ public class FileTypesTest
     {
         assertTrue( filetypes.matchesDefaultExclusions( "repository/test/.index/nexus-maven-repository-index.gz" ) );
         assertTrue( filetypes.matchesDefaultExclusions( "repository/test/.index/nexus-maven-repository-index.zip" ) );
-        assertTrue( filetypes.matchesDefaultExclusions( "repository/test/org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.sha1" ) );
-        assertTrue( filetypes.matchesDefaultExclusions( "repository/test/org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.md5" ) );
-        assertTrue( filetypes.matchesDefaultExclusions( "repository/test/org/apache/derby/derby/10.2.2.0/maven-metadata.xml" ) );
-        assertTrue( filetypes.matchesDefaultExclusions( "repository/test/org/apache/derby/derby/10.2.2.0/maven-metadata.xml.sha1" ) );
-        assertTrue( filetypes.matchesDefaultExclusions( "repository/test/org/apache/derby/derby/10.2.2.0/maven-metadata.xml.md5" ) );
-        
-        assertFalse( filetypes.matchesDefaultExclusions( "repository/test/org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.zip" ) );
-        assertFalse( filetypes.matchesDefaultExclusions( "repository/test/org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz" ) );
+        assertTrue( filetypes.matchesDefaultExclusions(
+            "repository/test/org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.sha1" ) );
+        assertTrue( filetypes.matchesDefaultExclusions(
+            "repository/test/org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.md5" ) );
+        assertTrue( filetypes.matchesDefaultExclusions(
+            "repository/test/org/apache/derby/derby/10.2.2.0/maven-metadata.xml" ) );
+        assertTrue( filetypes.matchesDefaultExclusions(
+            "repository/test/org/apache/derby/derby/10.2.2.0/maven-metadata.xml.sha1" ) );
+        assertTrue( filetypes.matchesDefaultExclusions(
+            "repository/test/org/apache/derby/derby/10.2.2.0/maven-metadata.xml.md5" ) );
+
+        assertFalse( filetypes.matchesDefaultExclusions(
+            "repository/test/org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.zip" ) );
+        assertFalse( filetypes.matchesDefaultExclusions(
+            "repository/test/org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz" ) );
     }
 }
index 37e19f7f9d05208e3fb7b048afd31f1ff6751d2c..6c2d1422a14a272247777a8e439af5655b866a58 100644 (file)
@@ -26,6 +26,7 @@ import org.junit.runners.JUnit4;
 
 /**
  * Test the generated LegacyArtifactPath class from Modello. This is primarily to test the hand coded methods.
+ *
  * @since 1.1
  */
 @RunWith( JUnit4.class )
index cf0c112450afe2945acfc6cdba4614424f0beb19..5eb3ab857053f2f5bd5792fbdcb408e8145ae54a 100644 (file)
@@ -19,6 +19,7 @@ package org.apache.archiva.configuration.functors;
  * under the License.
  */
 
+import junit.framework.TestCase;
 import org.apache.archiva.configuration.ProxyConnectorConfiguration;
 import org.apache.commons.lang.StringUtils;
 
@@ -26,10 +27,8 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import junit.framework.TestCase;
-
 /**
- * ProxyConnectorConfigurationOrderComparatorTest 
+ * ProxyConnectorConfigurationOrderComparatorTest
  *
  * @version $Id$
  */
@@ -47,7 +46,7 @@ public class ProxyConnectorConfigurationOrderComparatorTest
 
         Collections.sort( proxies, ProxyConnectorConfigurationOrderComparator.getInstance() );
 
-        assertProxyOrder( new String[] { "corporate", "snapshots", "3rdparty", "sandbox" }, proxies );
+        assertProxyOrder( new String[]{ "corporate", "snapshots", "3rdparty", "sandbox" }, proxies );
     }
 
     public void testSortNormal()
@@ -61,7 +60,7 @@ public class ProxyConnectorConfigurationOrderComparatorTest
 
         Collections.sort( proxies, new ProxyConnectorConfigurationOrderComparator() );
 
-        assertProxyOrder( new String[] { "snapshots", "3rdparty", "corporate", "sandbox" }, proxies );
+        assertProxyOrder( new String[]{ "snapshots", "3rdparty", "corporate", "sandbox" }, proxies );
     }
 
     public void testSortPartial()
@@ -75,7 +74,7 @@ public class ProxyConnectorConfigurationOrderComparatorTest
 
         Collections.sort( proxies, new ProxyConnectorConfigurationOrderComparator() );
 
-        assertProxyOrder( new String[] { "3rdparty", "corporate", "snapshots", "sandbox" }, proxies );
+        assertProxyOrder( new String[]{ "3rdparty", "corporate", "snapshots", "sandbox" }, proxies );
     }
 
     private void assertProxyOrder( String[] ids, List<ProxyConnectorConfiguration> proxies )