diff options
author | Brett Porter <brett@apache.org> | 2009-03-17 15:53:37 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2009-03-17 15:53:37 +0000 |
commit | 5881fb5829cb4b7b2cbfe83af3f8f84270bdbb19 (patch) | |
tree | 11c00dfcbe2123b6541cb23cfaa316197fd51da9 /archiva-modules/archiva-reporting/archiva-report-manager | |
parent | ad7be3a3fcc2b73e0f5695e36234dc3ee1fbc0f8 (diff) | |
download | archiva-5881fb5829cb4b7b2cbfe83af3f8f84270bdbb19.tar.gz archiva-5881fb5829cb4b7b2cbfe83af3f8f84270bdbb19.zip |
clean up warnings in reports modules
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@755290 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-reporting/archiva-report-manager')
5 files changed, 14 insertions, 13 deletions
diff --git a/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/DefaultReportingManager.java b/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/DefaultReportingManager.java index a472ff261..e1d77d48c 100644 --- a/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/DefaultReportingManager.java +++ b/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/DefaultReportingManager.java @@ -35,14 +35,14 @@ public class DefaultReportingManager /** * @plexus.requirement role="org.apache.maven.archiva.reporting.DynamicReportSource" */ - private Map reportSourceMap; + private Map<String, DynamicReportSource<?>> reportSourceMap; - public DynamicReportSource getReport( String id ) + public DynamicReportSource<?> getReport( String id ) { - return (DynamicReportSource) reportSourceMap.get( id ); + return reportSourceMap.get( id ); } - public Map getAvailableReports() + public Map<String, DynamicReportSource<?>> getAvailableReports() { return reportSourceMap; } diff --git a/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/DynamicReportSource.java b/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/DynamicReportSource.java index 255dde87b..f467b7340 100644 --- a/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/DynamicReportSource.java +++ b/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/DynamicReportSource.java @@ -19,17 +19,17 @@ package org.apache.maven.archiva.reporting; * under the License. */ +import java.util.List; + import org.apache.maven.archiva.database.ArchivaDatabaseException; import org.apache.maven.archiva.database.ObjectNotFoundException; -import java.util.List; - /** * DynamicReportSource * * @version $Id$ */ -public interface DynamicReportSource +public interface DynamicReportSource<T> { /** * The human readable name of this report. @@ -45,7 +45,7 @@ public interface DynamicReportSource * @throws ArchivaDatabaseException if there was a fundamental issue with accessing the database. * @throws ObjectNotFoundException if no records were found. */ - public List getData() throws ObjectNotFoundException, ArchivaDatabaseException; + public List<T> getData() throws ObjectNotFoundException, ArchivaDatabaseException; /** * Get the entire list of values for this report. @@ -57,5 +57,5 @@ public interface DynamicReportSource * @throws ArchivaDatabaseException if there was a fundamental issue with accessing the database. * @throws ObjectNotFoundException if no records were found. */ - public List getData( DataLimits limits ) throws ObjectNotFoundException, ArchivaDatabaseException; + public List<T> getData( DataLimits limits ) throws ObjectNotFoundException, ArchivaDatabaseException; } diff --git a/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/ReportingManager.java b/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/ReportingManager.java index 9302cd201..49fbf1ee3 100644 --- a/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/ReportingManager.java +++ b/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/ReportingManager.java @@ -28,7 +28,7 @@ import java.util.Map; */ public interface ReportingManager { - public DynamicReportSource getReport( String id ); + public DynamicReportSource<?> getReport( String id ); - public Map /*<String,DynamicReportSource>*/getAvailableReports(); + public Map<String,DynamicReportSource<?>> getAvailableReports(); } diff --git a/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/SimpleRepositoryStatisticsReportGenerator.java b/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/SimpleRepositoryStatisticsReportGenerator.java index a4159dc98..21db21184 100644 --- a/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/SimpleRepositoryStatisticsReportGenerator.java +++ b/archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/SimpleRepositoryStatisticsReportGenerator.java @@ -27,6 +27,7 @@ import org.apache.maven.archiva.database.ArchivaDAO; import org.apache.maven.archiva.database.ArchivaDatabaseException; import org.apache.maven.archiva.database.ArtifactDAO; import org.apache.maven.archiva.database.constraints.ArtifactsByRepositoryConstraint; +import org.apache.maven.archiva.model.ArchivaArtifact; import org.apache.maven.archiva.model.RepositoryContentStatistics; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -121,7 +122,7 @@ public class SimpleRepositoryStatisticsReportGenerator try { //TODO use the repo content stats whenGathered date instead of endDate for single repo reports - List types = artifactDao.queryArtifacts( + List<ArchivaArtifact> types = artifactDao.queryArtifacts( new ArtifactsByRepositoryConstraint( repository, JAR_TYPE, endDate, "whenGathered" ) ); repoStatistics.setJarCount( types.size() ); diff --git a/archiva-modules/archiva-reporting/archiva-report-manager/src/test/java/org/apache/maven/archiva/reporting/SimpleRepositoryStatisticsReportGeneratorTest.java b/archiva-modules/archiva-reporting/archiva-report-manager/src/test/java/org/apache/maven/archiva/reporting/SimpleRepositoryStatisticsReportGeneratorTest.java index 666599f90..c5bedea3e 100644 --- a/archiva-modules/archiva-reporting/archiva-report-manager/src/test/java/org/apache/maven/archiva/reporting/SimpleRepositoryStatisticsReportGeneratorTest.java +++ b/archiva-modules/archiva-reporting/archiva-report-manager/src/test/java/org/apache/maven/archiva/reporting/SimpleRepositoryStatisticsReportGeneratorTest.java @@ -342,7 +342,7 @@ public class SimpleRepositoryStatisticsReportGeneratorTest try { - List<RepositoryStatistics> data = generator.generateReport( repoContentStats, REPO, startDate, endDate, limits ); + generator.generateReport( repoContentStats, REPO, startDate, endDate, limits ); fail( "An ArchivaReportException should have been thrown." ); } catch ( ArchivaReportException a ) |