aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-reporting
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2009-03-17 15:53:37 +0000
committerBrett Porter <brett@apache.org>2009-03-17 15:53:37 +0000
commit5881fb5829cb4b7b2cbfe83af3f8f84270bdbb19 (patch)
tree11c00dfcbe2123b6541cb23cfaa316197fd51da9 /archiva-modules/archiva-reporting
parentad7be3a3fcc2b73e0f5695e36234dc3ee1fbc0f8 (diff)
downloadarchiva-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')
-rw-r--r--archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/CorruptArtifactReport.java2
-rw-r--r--archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/DuplicateArtifactReport.java2
-rw-r--r--archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/LocationArtifactsReport.java2
-rw-r--r--archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/OldArtifactReport.java2
-rw-r--r--archiva-modules/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/OldSnapshotArtifactReport.java2
-rw-r--r--archiva-modules/archiva-reporting/archiva-metadata-reports/src/main/java/org/apache/maven/archiva/reporting/metadata/MetadataReport.java2
-rw-r--r--archiva-modules/archiva-reporting/archiva-project-reports/src/main/java/org/apache/maven/archiva/reporting/project/MissingDependenciesReport.java2
-rw-r--r--archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/DefaultReportingManager.java8
-rw-r--r--archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/DynamicReportSource.java10
-rw-r--r--archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/ReportingManager.java4
-rw-r--r--archiva-modules/archiva-reporting/archiva-report-manager/src/main/java/org/apache/maven/archiva/reporting/SimpleRepositoryStatisticsReportGenerator.java3
-rw-r--r--archiva-modules/archiva-reporting/archiva-report-manager/src/test/java/org/apache/maven/archiva/reporting/SimpleRepositoryStatisticsReportGeneratorTest.java2
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;
* <a href="mailto:oching@apache.org">Maria Odea Ching</a>
*/
public class CorruptArtifactReport
- implements DynamicReportSource
+ implements DynamicReportSource<RepositoryProblem>
{
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<RepositoryProblem>
{
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<RepositoryProblem>
{
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<ArchivaArtifact>
{
/**
* @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<ArchivaArtifact>
{
/**
* @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<RepositoryProblem>
{
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<RepositoryProblem>
{
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<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 )