Author: rdonkin
Date: Sun Dec  8 21:50:54 2013
New Revision: 1549341

URL: http://svn.apache.org/r1549341
Log:
Delete RatException

Modified:
    
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/ArchiveEntryDocument.java
    
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/AbstractReport.java
    
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/IReportable.java
    
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/RatReport.java
    
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/xml/SimpleXmlClaimReporter.java
    
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/claim/util/LicenseAddingReport.java
    
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/claim/util/Pipeline.java
    
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/walker/ArchiveWalker.java
    
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/walker/DirectoryWalker.java
    
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/report/claim/impl/xml/MockClaimReporter.java
    
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/report/xml/XmlReportFactoryTest.java

Modified: 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/ArchiveEntryDocument.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/ArchiveEntryDocument.java?rev=1549341&r1=1549340&r2=1549341&view=diff
==============================================================================
--- 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/ArchiveEntryDocument.java
 (original)
+++ 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/ArchiveEntryDocument.java
 Sun Dec  8 21:50:54 2013
@@ -28,7 +28,6 @@ import java.io.Reader;
 
 import org.apache.rat.api.Document;
 import org.apache.rat.api.MetaData;
-import org.apache.rat.api.RatException;
 
 public class ArchiveEntryDocument implements Document {
 
@@ -37,7 +36,7 @@ public class ArchiveEntryDocument implem
 
     private final MetaData metaData = new MetaData();
 
-    public ArchiveEntryDocument(File file, byte[] contents) throws 
RatException {
+       public ArchiveEntryDocument(File file, byte[] contents) {
         super();
         name = DocumentImplUtils.toName(file);
         this.contents = contents;

Modified: 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/AbstractReport.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/AbstractReport.java?rev=1549341&r1=1549340&r2=1549341&view=diff
==============================================================================
--- 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/AbstractReport.java
 (original)
+++ 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/AbstractReport.java
 Sun Dec  8 21:50:54 2013
@@ -18,6 +18,8 @@
  */
 package org.apache.rat.report;
 
+import java.io.IOException;
+
 import org.apache.rat.api.Document;
 import org.apache.rat.api.RatException;
 
@@ -40,7 +42,7 @@ public abstract class AbstractReport imp
         * 
         * @see 
org.apache.rat.report.RatReport#report(org.apache.rat.api.Document)
         */
-       public abstract void report(final Document document) throws 
RatException;
+       public abstract void report(final Document document) throws IOException;
 
        /*
         * (non-Javadoc)

Modified: 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/IReportable.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/IReportable.java?rev=1549341&r1=1549340&r2=1549341&view=diff
==============================================================================
--- 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/IReportable.java
 (original)
+++ 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/IReportable.java
 Sun Dec  8 21:50:54 2013
@@ -18,6 +18,8 @@
  */
 package org.apache.rat.report;
 
+import java.io.IOException;
+
 import org.apache.rat.api.RatException;
 
 /**
@@ -33,5 +35,5 @@ public interface IReportable {
         * @throws RatException
         *             the rat exception
         */
-       void run(RatReport report) throws RatException;
+       void run(RatReport report) throws IOException;
 }

Modified: 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/RatReport.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/RatReport.java?rev=1549341&r1=1549340&r2=1549341&view=diff
==============================================================================
--- 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/RatReport.java
 (original)
+++ 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/RatReport.java
 Sun Dec  8 21:50:54 2013
@@ -18,6 +18,8 @@
  */
 package org.apache.rat.report;
 
+import java.io.IOException;
+
 import org.apache.rat.api.Document;
 import org.apache.rat.api.RatException;
 
@@ -42,7 +44,7 @@ public interface RatReport {
         * @throws RatException
         *             the rat exception
         */
-       void report(Document document) throws RatException;
+       void report(Document document) throws IOException;
 
        /**
         * End report.

Modified: 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/xml/SimpleXmlClaimReporter.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/xml/SimpleXmlClaimReporter.java?rev=1549341&r1=1549340&r2=1549341&view=diff
==============================================================================
--- 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/xml/SimpleXmlClaimReporter.java
 (original)
+++ 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/claim/impl/xml/SimpleXmlClaimReporter.java
 Sun Dec  8 21:50:54 2013
@@ -107,19 +107,14 @@ public class SimpleXmlClaimReporter exte
         * 
org.apache.rat.report.AbstractReport#report(org.apache.rat.api.Document)
         */
        @Override
-       public void report(final Document subject) throws RatException {
-               try {
-                       if (firstTime) {
-                               firstTime = false;
-                       } else {
-                               writer.closeElement();
-                       }
-                       writer.openElement("resource").attribute(NAME, 
subject.getName());
-                       writeDocumentClaims(subject);
-               } catch (IOException e) {
-                       throw new RatException("XML writing failure: " + 
e.getMessage()
-                                       + " subject: " + subject, e);
+       public void report(final Document subject) throws IOException {
+               if (firstTime) {
+                       firstTime = false;
+               } else {
+                       writer.closeElement();
                }
+               writer.openElement("resource").attribute(NAME, 
subject.getName());
+               writeDocumentClaims(subject);
        }
 
        /**

Modified: 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/claim/util/LicenseAddingReport.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/claim/util/LicenseAddingReport.java?rev=1549341&r1=1549340&r2=1549341&view=diff
==============================================================================
--- 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/claim/util/LicenseAddingReport.java
 (original)
+++ 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/claim/util/LicenseAddingReport.java
 Sun Dec  8 21:50:54 2013
@@ -25,7 +25,6 @@ import org.apache.rat.annotation.Abstrac
 import org.apache.rat.annotation.ApacheV2LicenceAppender;
 import org.apache.rat.api.MetaData;
 import org.apache.rat.api.MetaData.Datum;
-import org.apache.rat.api.RatException;
 import org.apache.rat.report.AbstractReport;
 
 /**
@@ -59,7 +58,7 @@ public class LicenseAddingReport extends
         */
        @Override
        public void report(final org.apache.rat.api.Document document)
-                       throws RatException {
+                       throws IOException {
                final MetaData metaData = document.getMetaData();
                final Datum licenseHeader = metaData
                                .get(MetaData.RAT_URL_HEADER_CATEGORY);
@@ -68,11 +67,7 @@ public class LicenseAddingReport extends
                                                
.getValue().equals(licenseHeader.getValue())) {
                        final File file = new File(document.getName());
                        if (file.isFile()) {
-                               try {
-                                       appender.append(file);
-                               } catch (IOException e) {
-                                       throw new RatException(e.getMessage(), 
e);
-                               }
+                               appender.append(file);
                        }
                }
                metaData.getData();

Modified: 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/claim/util/Pipeline.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/claim/util/Pipeline.java?rev=1549341&r1=1549340&r2=1549341&view=diff
==============================================================================
--- 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/claim/util/Pipeline.java
 (original)
+++ 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/report/claim/util/Pipeline.java
 Sun Dec  8 21:50:54 2013
@@ -64,13 +64,9 @@ public class Pipeline implements RatRepo
         * 
         * @see 
org.apache.rat.report.RatReport#report(org.apache.rat.api.Document)
         */
-       public void report(final Document document) throws RatException {
+       public void report(final Document document) throws IOException {
                if (this.analyser != null) {
-                       try {
                                this.analyser.analyse(document);
-                       } catch (final IOException e) {
-                               throw new RatException(e.getMessage(), e);
-                       }
                }
 
                if (this.policy != null) {

Modified: 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/walker/ArchiveWalker.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/walker/ArchiveWalker.java?rev=1549341&r1=1549340&r2=1549341&view=diff
==============================================================================
--- 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/walker/ArchiveWalker.java
 (original)
+++ 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/walker/ArchiveWalker.java
 Sun Dec  8 21:50:54 2013
@@ -60,9 +60,8 @@ public class ArchiveWalker extends Walke
      * @param report the defined RatReport to run on this GZIP walker.
      * 
      */
-    public void run(final RatReport report) throws RatException {
+       public void run(final RatReport report) throws IOException {
 
-        try {
             ArchiveInputStream input;
 
             /* I am really sad that classes aren't first-class objects in
@@ -98,9 +97,6 @@ public class ArchiveWalker extends Walke
             }
 
             input.close();
-        } catch (IOException e) {
-            throw new RatException(e);
-        }
     }
 
     /**
@@ -110,7 +106,8 @@ public class ArchiveWalker extends Walke
      * @param file the file to be reported on
      * @throws RatException
      */
-    private void report(final RatReport report, byte[] contents, File file) 
throws RatException {
+       private void report(final RatReport report, byte[] contents, File file)
+                       throws IOException {
 
         Document document = new ArchiveEntryDocument(file, contents);
         report.report(document);

Modified: 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/walker/DirectoryWalker.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/walker/DirectoryWalker.java?rev=1549341&r1=1549340&r2=1549341&view=diff
==============================================================================
--- 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/walker/DirectoryWalker.java
 (original)
+++ 
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/walker/DirectoryWalker.java
 Sun Dec  8 21:50:54 2013
@@ -21,6 +21,7 @@ package org.apache.rat.walker;
 
 import java.io.File;
 import java.io.FilenameFilter;
+import java.io.IOException;
 import java.util.Arrays;
 import java.util.regex.Pattern;
 
@@ -93,7 +94,7 @@ public class DirectoryWalker extends Wal
         *             the rat exception
         */
        private void processDirectory(final RatReport report, final File file)
-                       throws RatException {
+                       throws IOException {
                if (!isRestricted(file)) {
                        process(report, file);
                }
@@ -108,7 +109,7 @@ public class DirectoryWalker extends Wal
         * @throws RatException
         *             the rat exception
         */
-       public void run(final RatReport report) throws RatException {
+       public void run(final RatReport report) throws IOException {
                process(report, file);
        }
 
@@ -123,7 +124,7 @@ public class DirectoryWalker extends Wal
         *             the rat exception
         */
        private void process(final RatReport report, final File file)
-                       throws RatException {
+                       throws IOException {
                final File[] files = file.listFiles();
                Arrays.sort(files, COMPARATOR);
                if (files != null) {
@@ -145,7 +146,7 @@ public class DirectoryWalker extends Wal
         *             the rat exception
         */
        private void processDirectories(final RatReport report, final File... 
files)
-                       throws RatException {
+                       throws IOException {
                for (File file : files) {
                        if (!ignored(file) && file.isDirectory()) {
                                processDirectory(report, file);
@@ -165,7 +166,7 @@ public class DirectoryWalker extends Wal
         *             the rat exception
         */
        private void processNonDirectories(final RatReport report,
-                       final File... files) throws RatException {
+                       final File... files) throws IOException {
                for (File file : files) {
                        if (!ignored(file) && !file.isDirectory()) {
                                report(report, file);
@@ -184,7 +185,7 @@ public class DirectoryWalker extends Wal
         *             the rat exception
         */
        private void report(final RatReport report, final File file)
-                       throws RatException {
+                       throws IOException {
 
                Document document = new FileDocument(file);
                report.report(document);

Modified: 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/report/claim/impl/xml/MockClaimReporter.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/report/claim/impl/xml/MockClaimReporter.java?rev=1549341&r1=1549340&r2=1549341&view=diff
==============================================================================
--- 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/report/claim/impl/xml/MockClaimReporter.java
 (original)
+++ 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/report/claim/impl/xml/MockClaimReporter.java
 Sun Dec  8 21:50:54 2013
@@ -18,8 +18,9 @@
  */ 
 package org.apache.rat.report.claim.impl.xml;
 
+import java.io.IOException;
+
 import org.apache.rat.api.Document;
-import org.apache.rat.api.RatException;
 import org.apache.rat.report.AbstractReport;
 
 /**
@@ -34,7 +35,7 @@ public class MockClaimReporter extends A
         * 
org.apache.rat.report.AbstractReport#report(org.apache.rat.api.Document)
         */
        @Override
-       public void report(Document document) throws RatException {
+       public void report(Document document) throws IOException {
 
        }
 }

Modified: 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/report/xml/XmlReportFactoryTest.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/report/xml/XmlReportFactoryTest.java?rev=1549341&r1=1549340&r2=1549341&view=diff
==============================================================================
--- 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/report/xml/XmlReportFactoryTest.java
 (original)
+++ 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/report/xml/XmlReportFactoryTest.java
 Sun Dec  8 21:50:54 2013
@@ -78,7 +78,7 @@ public class XmlReportFactoryTest {
         *             the rat exception
         */
        private void report(final DirectoryWalker directory, final RatReport 
report)
-                       throws RatException {
+                       throws IOException {
                directory.run(report);
        }
 
@@ -104,6 +104,9 @@ public class XmlReportFactoryTest {
                                statistic, configuration);
                report.startReport();
                report(directory, report);
+               // File file = 
Resources.getResourceFile("elements/Source.java");
+               // Document document = new FileDocument(file);
+               // report.report(document);
                report.endReport();
                writer.closeDocument();
                final String output = out.toString();


Reply via email to