You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@creadur.apache.org by rd...@apache.org on 2009/05/22 21:54:22 UTC
svn commit: r777682 - in /incubator/rat/main/trunk/apache-rat-core/src:
main/java/org/apache/rat/report/claim/
main/java/org/apache/rat/report/claim/impl/
main/java/org/apache/rat/report/claim/impl/xml/
main/java/org/apache/rat/report/claim/util/ test/...
Author: rdonkin
Date: Fri May 22 19:54:21 2009
New Revision: 777682
URL: http://svn.apache.org/viewvc?rev=777682&view=rev
Log:
RAT-53 Remove IClaim. https://issues.apache.org/jira/browse/RAT-53
Removed:
incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/IClaim.java
incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/AbstractClaim.java
Modified:
incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/IClaimReporter.java
incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/AbstractClaimReporter.java
incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/ClaimAggregator.java
incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/xml/SimpleXmlClaimReporter.java
incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/util/ClaimReporterMultiplexer.java
incubator/rat/main/trunk/apache-rat-core/src/test/java/org/apache/rat/report/claim/impl/xml/MockClaimReporter.java
Modified: incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/IClaimReporter.java
URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/IClaimReporter.java?rev=777682&r1=777681&r2=777682&view=diff
==============================================================================
--- incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/IClaimReporter.java (original)
+++ incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/IClaimReporter.java Fri May 22 19:54:21 2009
@@ -30,10 +30,4 @@
* @throws RatReportFailedException
*/
void report(IDocument subject) throws RatReportFailedException;
-
- /**
- * States a claim.
- * @param pClaim The claim to state.
- */
- void claim(IClaim pClaim) throws RatReportFailedException;
}
Modified: incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/AbstractClaimReporter.java
URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/AbstractClaimReporter.java?rev=777682&r1=777681&r2=777682&view=diff
==============================================================================
--- incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/AbstractClaimReporter.java (original)
+++ incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/AbstractClaimReporter.java Fri May 22 19:54:21 2009
@@ -3,7 +3,6 @@
import org.apache.rat.api.MetaData;
import org.apache.rat.document.IDocument;
import org.apache.rat.report.RatReportFailedException;
-import org.apache.rat.report.claim.IClaim;
import org.apache.rat.report.claim.IClaimReporter;
@@ -30,14 +29,6 @@
// Does nothing
}
- protected void handleClaim(IClaim pClaim) {
- throw new IllegalStateException("Unsupported type of claim: " + pClaim.getClass().getName());
- }
-
- public void claim(IClaim pClaim) throws RatReportFailedException {
- handleClaim(pClaim);
- }
-
private void writeDocumentClaim(IDocument subject) {
final MetaData metaData = subject.getMetaData();
writeHeaderCategory(metaData);
Modified: incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/ClaimAggregator.java
URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/ClaimAggregator.java?rev=777682&r1=777681&r2=777682&view=diff
==============================================================================
--- incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/ClaimAggregator.java (original)
+++ incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/ClaimAggregator.java Fri May 22 19:54:21 2009
@@ -7,7 +7,6 @@
import org.apache.rat.document.IDocument;
import org.apache.rat.report.RatReportFailedException;
import org.apache.rat.report.claim.ClaimStatistic;
-import org.apache.rat.report.claim.IClaim;
import org.apache.rat.report.claim.IClaimReporter;
@@ -74,12 +73,6 @@
pStatistic.setNumUnknown(numUnknown);
}
- public void claim(IClaim pClaim) throws RatReportFailedException {
- super.claim(pClaim);
- if (reporter != null) {
- reporter.claim(pClaim);
- }
- }
public void report(IDocument document) throws RatReportFailedException {
super.report(document);
Modified: incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/xml/SimpleXmlClaimReporter.java
URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/xml/SimpleXmlClaimReporter.java?rev=777682&r1=777681&r2=777682&view=diff
==============================================================================
--- incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/xml/SimpleXmlClaimReporter.java (original)
+++ incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/xml/SimpleXmlClaimReporter.java Fri May 22 19:54:21 2009
@@ -23,7 +23,6 @@
import org.apache.rat.api.MetaData;
import org.apache.rat.document.IDocument;
import org.apache.rat.report.RatReportFailedException;
-import org.apache.rat.report.claim.IClaim;
import org.apache.rat.report.claim.IClaimReporter;
import org.apache.rat.report.xml.writer.IXmlWriter;
@@ -64,20 +63,6 @@
}
}
- protected void handleClaim(IClaim pClaim) throws IOException, RatReportFailedException {
- throw new IllegalStateException("Invalid claim type: " + pClaim.getClass().getName());
- }
-
- public void claim(IClaim pClaim) throws RatReportFailedException {
- try {
- handleClaim(pClaim);
- } catch (IOException e) {
- throw new RatReportFailedException("XML writing failure: " + e.getMessage()
- + " claim type: "
- + pClaim.getClass().getName(), e);
- }
- }
-
public void report(final IDocument subject) throws RatReportFailedException {
try {
if (firstTime) {
Modified: incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/util/ClaimReporterMultiplexer.java
URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/util/ClaimReporterMultiplexer.java?rev=777682&r1=777681&r2=777682&view=diff
==============================================================================
--- incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/util/ClaimReporterMultiplexer.java (original)
+++ incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/report/claim/util/ClaimReporterMultiplexer.java Fri May 22 19:54:21 2009
@@ -20,7 +20,6 @@
import org.apache.rat.document.IDocument;
import org.apache.rat.report.RatReportFailedException;
-import org.apache.rat.report.claim.IClaim;
import org.apache.rat.report.claim.IClaimReporter;
public class ClaimReporterMultiplexer implements IClaimReporter {
@@ -32,14 +31,6 @@
this.reporters = reporters;
}
- public void claim(IClaim pClaim)
- throws RatReportFailedException {
- final int length = reporters.length;
- for (int i=0;i<length;i++) {
- reporters[i].claim(pClaim);
- }
- }
-
public void report(IDocument document) throws RatReportFailedException {
final int length = reporters.length;
for (int i=0;i<length;i++) {
Modified: incubator/rat/main/trunk/apache-rat-core/src/test/java/org/apache/rat/report/claim/impl/xml/MockClaimReporter.java
URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/apache-rat-core/src/test/java/org/apache/rat/report/claim/impl/xml/MockClaimReporter.java?rev=777682&r1=777681&r2=777682&view=diff
==============================================================================
--- incubator/rat/main/trunk/apache-rat-core/src/test/java/org/apache/rat/report/claim/impl/xml/MockClaimReporter.java (original)
+++ incubator/rat/main/trunk/apache-rat-core/src/test/java/org/apache/rat/report/claim/impl/xml/MockClaimReporter.java Fri May 22 19:54:21 2009
@@ -18,23 +18,12 @@
*/
package org.apache.rat.report.claim.impl.xml;
-import java.util.ArrayList;
-import java.util.List;
-
import org.apache.rat.document.IDocument;
import org.apache.rat.report.RatReportFailedException;
-import org.apache.rat.report.claim.IClaim;
import org.apache.rat.report.claim.IClaimReporter;
public class MockClaimReporter implements IClaimReporter {
- public List claims = new ArrayList();
-
- public void claim(IClaim pClaim)
- throws RatReportFailedException {
- claims.add(pClaim);
- }
-
public void report(IDocument document) throws RatReportFailedException {
}
}