]> source.dussan.org Git - archiva.git/commitdiff
revise code warnings in archiva-configuration
authorBrett Porter <brett@apache.org>
Tue, 17 Mar 2009 13:43:33 +0000 (13:43 +0000)
committerBrett Porter <brett@apache.org>
Tue, 17 Mar 2009 13:43:33 +0000 (13:43 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@755240 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java
archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoader.java
archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ArchivaConfigurationTest.java

index cb00de9a88694ab60c8cbb3442da60fed5e765dc..1f22b1027daafa252229faeecfea3fb8ef187fc1 100644 (file)
@@ -160,6 +160,7 @@ public class DefaultArchivaConfiguration
         return configuration;
     }
 
+    @SuppressWarnings("unchecked")
     private Configuration load()
     {   
         // TODO: should this be the same as section? make sure unnamed sections still work (eg, sys properties)
@@ -399,6 +400,7 @@ public class DefaultArchivaConfiguration
         return registry.getSubset( KEY );
     }
 
+    @SuppressWarnings("unchecked")
     public synchronized void save( Configuration configuration )
         throws RegistryException, IndeterminateConfigurationException
     {
index 1211038c93623a43b590947f8e2879f636af5a80..e43eedcb97221ea0766f9c51bdc51011366ecd42 100644 (file)
@@ -89,7 +89,7 @@ public class MavenProxyPropertyLoader
             String url = getMandatoryProperty( props, "repo." + key + ".url" );
             String proxyKey = repoProps.getProperty( "proxy" );
 
-            int cachePeriod = Integer.parseInt( repoProps.getProperty( "cache.period", "60" ) );
+//            int cachePeriod = Integer.parseInt( repoProps.getProperty( "cache.period", "60" ) );
 
             RemoteRepositoryConfiguration repository = new RemoteRepositoryConfiguration();
             repository.setId( key );
index 3787845bb97986561a2f98fd96679d62acd7f332..d874420fb852bce87ba7d661a224166f20e95c6e 100644 (file)
@@ -674,9 +674,6 @@ public class ArchivaConfigurationTest
 
                 Configuration configuration = archivaConfiguration.getConfiguration();
 
-                ManagedRepositoryConfiguration repository =
-                    (ManagedRepositoryConfiguration) configuration.getManagedRepositories().get( 0 );
-
                 assertEquals( "check cron expression", "0 0,15 0 * * ?",
                               configuration.getDatabaseScanning().getCronExpression() );
             }