From 41854b9e2fdecb1300e496f4afcdf03d47c93056 Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Tue, 17 Mar 2009 13:43:33 +0000 Subject: [PATCH] revise code warnings in archiva-configuration git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@755240 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/configuration/DefaultArchivaConfiguration.java | 2 ++ .../maven/archiva/configuration/MavenProxyPropertyLoader.java | 2 +- .../maven/archiva/configuration/ArchivaConfigurationTest.java | 3 --- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java index cb00de9a8..1f22b1027 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java @@ -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 { diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoader.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoader.java index 1211038c9..e43eedcb9 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoader.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoader.java @@ -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 ); diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ArchivaConfigurationTest.java b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ArchivaConfigurationTest.java index 3787845bb..d874420fb 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ArchivaConfigurationTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ArchivaConfigurationTest.java @@ -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() ); } -- 2.39.5