From 643ac963f248dbd31bf4ebe166af023b259bd4c1 Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Tue, 17 Mar 2009 17:01:40 +0000 Subject: [PATCH] clean up warnings in xmlrpc modules git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@755322 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/web/xmlrpc/api/beans/ManagedRepository.java | 1 - .../archiva/web/xmlrpc/api/beans/RemoteRepository.java | 1 - .../archiva/xmlrpc/security/XmlRpcAuthenticatorTest.java | 1 + .../archiva/web/xmlrpc/services/SearchServiceImpl.java | 1 - .../web/xmlrpc/services/SearchServiceImplTest.java | 8 ++------ 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/ManagedRepository.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/ManagedRepository.java index fd0f9ef4f..ad36b140f 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/ManagedRepository.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/ManagedRepository.java @@ -96,7 +96,6 @@ public class ManagedRepository public int hashCode() { int result = 17; - long tmp; result = 37 * result + ( id != null ? id.hashCode() : 0 ); return result; } diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/RemoteRepository.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/RemoteRepository.java index 399b59e57..a15a8a679 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/RemoteRepository.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/RemoteRepository.java @@ -90,7 +90,6 @@ public class RemoteRepository public int hashCode() { int result = 17; - long tmp; result = 37 * result + ( id != null ? id.hashCode() : 0 ); return result; } diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/java/org/apache/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/java/org/apache/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.java index 4830674f2..3caa68c4b 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/java/org/apache/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/test/java/org/apache/archiva/xmlrpc/security/XmlRpcAuthenticatorTest.java @@ -177,6 +177,7 @@ public class XmlRpcAuthenticatorTest configControl.replay(); boolean isAuthorized = authenticator.isAuthorized( xmlRpcRequest ); + assertTrue( isAuthorized ); xmlRpcRequestControl.verify(); configControl.verify(); diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImpl.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImpl.java index da5714d4a..b0654dfbb 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImpl.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImpl.java @@ -156,7 +156,6 @@ public class SearchServiceImpl final List observableRepos = xmlRpcUserRepositories.getObservableRepositories(); final BrowsingResults results = repoBrowsing.selectArtifactId( "", observableRepos, groupId, artifactId ); - final ArtifactDAO artifactDAO = archivaDAO.getArtifactDAO(); for( final String version : results.getVersions() ) { diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImplTest.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImplTest.java index bf9598bfc..8b7880aea 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImplTest.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/SearchServiceImplTest.java @@ -25,10 +25,6 @@ import java.util.Date; import java.util.List; import org.apache.archiva.indexer.search.RepositorySearch; -import org.apache.archiva.indexer.search.SearchResultHit; -import org.apache.archiva.indexer.search.SearchResultLimits; -import org.apache.archiva.indexer.search.SearchResults; -import org.apache.archiva.indexer.util.SearchUtil; import org.apache.archiva.web.xmlrpc.api.SearchService; import org.apache.archiva.web.xmlrpc.api.beans.Artifact; import org.apache.archiva.web.xmlrpc.api.beans.Dependency; @@ -379,7 +375,7 @@ public class SearchServiceImplTest try { - List dependencies = searchService.getDependencies( "org.apache.archiva", "archiva-test", "1.0" ); + searchService.getDependencies( "org.apache.archiva", "archiva-test", "1.0" ); fail( "An exception should have been thrown." ); } catch ( Exception e ) @@ -415,7 +411,7 @@ public class SearchServiceImplTest observableRepoIds.add( "repo1.mirror" ); observableRepoIds.add( "public.releases" ); - List dependeeModels = new ArrayList(); + List dependeeModels = new ArrayList(); ArchivaProjectModel dependeeModel = new ArchivaProjectModel(); dependeeModel.setGroupId( "org.apache.archiva" ); dependeeModel.setArtifactId( "archiva-dependee-one" ); -- 2.39.5