From ad7be3a3fcc2b73e0f5695e36234dc3ee1fbc0f8 Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Tue, 17 Mar 2009 15:47:25 +0000 Subject: [PATCH] clean up warnings git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@755287 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/policies/PropagateErrorsDownloadPolicy.java | 9 ++++----- .../maven/archiva/proxy/AbstractProxyTestCase.java | 1 + .../org/apache/maven/archiva/proxy/WagonDelegate.java | 2 ++ .../reporting/project/MissingDependenciesReport.java | 5 +++-- .../reporting/project/ProjectDependenciesConsumer.java | 6 +++--- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsDownloadPolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsDownloadPolicy.java index 76b688f21..e21130e6f 100644 --- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsDownloadPolicy.java +++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsDownloadPolicy.java @@ -19,17 +19,16 @@ package org.apache.maven.archiva.policies; * under the License. */ -import org.apache.commons.lang.StringUtils; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Properties; +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * PropagateErrorsPolicy - a policy applied on error to determine how to treat the error. * diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java index eab69300e..fe5760870 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java @@ -200,6 +200,7 @@ public abstract class AbstractProxyTestCase assertNull( "Found file: " + downloadedFile + "; but was expecting a failure", downloadedFile ); } + @SuppressWarnings("unchecked") protected void assertNoTempFiles( File expectedFile ) { File workingDir = expectedFile.getParentFile(); diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/WagonDelegate.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/WagonDelegate.java index 94f8727b7..e59fddb4a 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/WagonDelegate.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/WagonDelegate.java @@ -88,6 +88,7 @@ public class WagonDelegate return delegate.resourceExists( resourceName ); } + @SuppressWarnings("unchecked") public List getFileList( String destinationDirectory ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { @@ -150,6 +151,7 @@ public class WagonDelegate delegate.connect( source, authenticationInfo, proxyInfoProvider ); } + @SuppressWarnings("deprecation") public void openConnection() throws ConnectionException, AuthenticationException { diff --git a/archiva-modules/archiva-reporting/archiva-project-reports/src/main/java/org/apache/maven/archiva/reporting/project/MissingDependenciesReport.java b/archiva-modules/archiva-reporting/archiva-project-reports/src/main/java/org/apache/maven/archiva/reporting/project/MissingDependenciesReport.java index 8c1605517..0cd854c0b 100644 --- a/archiva-modules/archiva-reporting/archiva-project-reports/src/main/java/org/apache/maven/archiva/reporting/project/MissingDependenciesReport.java +++ b/archiva-modules/archiva-reporting/archiva-project-reports/src/main/java/org/apache/maven/archiva/reporting/project/MissingDependenciesReport.java @@ -24,6 +24,7 @@ import org.apache.maven.archiva.database.ArchivaDatabaseException; import org.apache.maven.archiva.database.Constraint; import org.apache.maven.archiva.database.ObjectNotFoundException; import org.apache.maven.archiva.database.constraints.RepositoryProblemByTypeConstraint; +import org.apache.maven.archiva.model.RepositoryProblem; import org.apache.maven.archiva.reporting.DataLimits; import org.apache.maven.archiva.reporting.DynamicReportSource; @@ -59,13 +60,13 @@ public class MissingDependenciesReport constraint = new RepositoryProblemByTypeConstraint( PROBLEM_TYPE_MISSING_DEPENDENCY ); } - public List getData() + public List getData() throws ObjectNotFoundException, ArchivaDatabaseException { return dao.getRepositoryProblemDAO().queryRepositoryProblems( constraint ); } - public List getData( DataLimits limits ) + public List getData( DataLimits limits ) throws ObjectNotFoundException, ArchivaDatabaseException { // TODO: implement limits. diff --git a/archiva-modules/archiva-reporting/archiva-project-reports/src/main/java/org/apache/maven/archiva/reporting/project/ProjectDependenciesConsumer.java b/archiva-modules/archiva-reporting/archiva-project-reports/src/main/java/org/apache/maven/archiva/reporting/project/ProjectDependenciesConsumer.java index e5da6a289..9a46dd1d1 100644 --- a/archiva-modules/archiva-reporting/archiva-project-reports/src/main/java/org/apache/maven/archiva/reporting/project/ProjectDependenciesConsumer.java +++ b/archiva-modules/archiva-reporting/archiva-project-reports/src/main/java/org/apache/maven/archiva/reporting/project/ProjectDependenciesConsumer.java @@ -49,11 +49,11 @@ public class ProjectDependenciesConsumer */ private String description; - private List includes; + private List includes; public ProjectDependenciesConsumer() { - this.includes = new ArrayList(); + this.includes = new ArrayList(); this.includes.add( "pom" ); } @@ -82,7 +82,7 @@ public class ProjectDependenciesConsumer /* do nothing */ } - public List getIncludedTypes() + public List getIncludedTypes() { return includes; } -- 2.39.5