From 5881fb5829cb4b7b2cbfe83af3f8f84270bdbb19 Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Tue, 17 Mar 2009 15:53:37 +0000 Subject: [PATCH] clean up warnings in reports modules git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@755290 13f79535-47bb-0310-9956-ffa450edef68 --- .../reporting/artifact/CorruptArtifactReport.java | 2 +- .../reporting/artifact/DuplicateArtifactReport.java | 2 +- .../reporting/artifact/LocationArtifactsReport.java | 2 +- .../archiva/reporting/artifact/OldArtifactReport.java | 2 +- .../reporting/artifact/OldSnapshotArtifactReport.java | 2 +- .../archiva/reporting/metadata/MetadataReport.java | 2 +- .../reporting/project/MissingDependenciesReport.java | 2 +- .../archiva/reporting/DefaultReportingManager.java | 8 ++++---- .../maven/archiva/reporting/DynamicReportSource.java | 10 +++++----- .../maven/archiva/reporting/ReportingManager.java | 4 ++-- .../SimpleRepositoryStatisticsReportGenerator.java | 3 ++- .../SimpleRepositoryStatisticsReportGeneratorTest.java | 2 +- 12 files changed, 21 insertions(+), 20 deletions(-) diff --git a/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/CorruptArtifactReport.java b/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/CorruptArtifactReport.java index c9280e853..cad4ec43a 100644 --- a/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/CorruptArtifactReport.java +++ b/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/CorruptArtifactReport.java @@ -36,7 +36,7 @@ import java.util.List; * Maria Odea Ching */ public class CorruptArtifactReport - implements DynamicReportSource + implements DynamicReportSource { public static final String PROBLEM_TYPE_CORRUPT_ARTIFACT = "corrupt-artifact"; diff --git a/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/DuplicateArtifactReport.java b/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/DuplicateArtifactReport.java index abf2ccb91..26bd00c63 100644 --- a/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/DuplicateArtifactReport.java +++ b/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/DuplicateArtifactReport.java @@ -39,7 +39,7 @@ import java.util.List; * role-hint="duplicate-artifacts" */ public class DuplicateArtifactReport - implements DynamicReportSource + implements DynamicReportSource { public static final String PROBLEM_TYPE_DUPLICATE_ARTIFACTS = "duplicate-artifacts"; diff --git a/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/LocationArtifactsReport.java b/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/LocationArtifactsReport.java index 9a3f232ef..0f5fd82eb 100644 --- a/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/LocationArtifactsReport.java +++ b/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/LocationArtifactsReport.java @@ -39,7 +39,7 @@ import java.util.List; * role-hint="artifact-location" */ public class LocationArtifactsReport - implements DynamicReportSource + implements DynamicReportSource { public static final String PROBLEM_TYPE_BAD_ARTIFACT_LOCATION = "bad-artifact-location"; diff --git a/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/OldArtifactReport.java b/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/OldArtifactReport.java index 4a40c80bd..858d49cd0 100644 --- a/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/OldArtifactReport.java +++ b/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/OldArtifactReport.java @@ -38,7 +38,7 @@ import org.apache.maven.archiva.reporting.DynamicReportSource; * role-hint="old-artifacts" */ public class OldArtifactReport - implements DynamicReportSource + implements DynamicReportSource { /** * @plexus.configuration default-value="Old Artifacts Report" diff --git a/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/OldSnapshotArtifactReport.java b/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/OldSnapshotArtifactReport.java index b3c217d03..7c0b99b52 100644 --- a/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/OldSnapshotArtifactReport.java +++ b/archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/OldSnapshotArtifactReport.java @@ -38,7 +38,7 @@ import org.apache.maven.archiva.reporting.DynamicReportSource; * role-hint="old-snapshots" */ public class OldSnapshotArtifactReport - implements DynamicReportSource + implements DynamicReportSource { /** * @plexus.configuration default-value="Old Snapshots Report" diff --git a/archiva-modules/archiva-reporting/archiva-metadata-reports/src/main/java/org/apache/maven/archiva/reporting/metadata/MetadataReport.java b/archiva-modules/archiva-reporting/archiva-metadata-reports/src/main/java/org/apache/maven/archiva/reporting/metadata/MetadataReport.java index f651acad6..27db5dfaa 100644 --- a/archiva-modules/archiva-reporting/archiva-metadata-reports/src/main/java/org/apache/maven/archiva/reporting/metadata/MetadataReport.java +++ b/archiva-modules/archiva-reporting/archiva-metadata-reports/src/main/java/org/apache/maven/archiva/reporting/metadata/MetadataReport.java @@ -39,7 +39,7 @@ import java.util.List; * role-hint="metadata" */ public class MetadataReport - implements DynamicReportSource + implements DynamicReportSource { public static final String PROBLEM_TYPE_METADATA = "metadata"; 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 0cd854c0b..585b1a1dd 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 @@ -39,7 +39,7 @@ import java.util.List; * role-hint="missing-dependencies" */ public class MissingDependenciesReport - implements DynamicReportSource + implements DynamicReportSource { public static final String PROBLEM_TYPE_MISSING_DEPENDENCY = "missing-dependency"; 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> 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> 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 { /** * 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 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 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 /**/getAvailableReports(); + public Map> 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 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 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 ) -- 2.39.5