Author: dennisl
Date: Tue Oct  9 20:47:00 2012
New Revision: 1396305

URL: http://svn.apache.org/viewvc?rev=1396305&view=rev
Log:
Replace tab characters with spaces.

Modified:
    
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/HeaderCheckWorker.java
    
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/IHeaderMatcher.java
    
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/ApacheSoftwareLicense20.java
    
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL1License.java
    
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL2License.java
    
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL3License.java
    
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/MITLicense.java
    
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/util/HeaderMatcherMultiplexer.java
    
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/AbstractMonolithicDocument.java
    
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/ArchiveEntryDocument.java
    
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/DocumentImplUtils.java
    
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/MonolithicFileDocument.java
    
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/walker/ArchiveWalker.java
    
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/walker/DirectoryWalker.java
    
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/walker/Walker.java

Modified: 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/HeaderCheckWorker.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/HeaderCheckWorker.java?rev=1396305&r1=1396304&r2=1396305&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/HeaderCheckWorker.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/HeaderCheckWorker.java
 Tue Oct  9 20:47:00 2012
@@ -32,87 +32,87 @@ import org.apache.rat.api.MetaData;
 class HeaderCheckWorker {
 
     public static final int DEFAULT_NUMBER_OF_RETAINED_HEADER_LINES = 50;
-       
-       private final int numberOfRetainedHeaderLines;
-       private final BufferedReader reader;
-       private final IHeaderMatcher matcher;
+
+    private final int numberOfRetainedHeaderLines;
+    private final BufferedReader reader;
+    private final IHeaderMatcher matcher;
     private final Document subject;
     
-       private boolean match = false;
-       
-       private int headerLinesToRead;
-       private boolean finished = false;
+    private boolean match = false;
+
+    private int headerLinesToRead;
+    private boolean finished = false;
 
-       public HeaderCheckWorker(Reader reader, int numberOfRetainedHeaderLine, 
+    public HeaderCheckWorker(Reader reader, int numberOfRetainedHeaderLine,
             final IHeaderMatcher matcher, final Document name) {
-               this(new BufferedReader(reader), numberOfRetainedHeaderLine, 
matcher, name);
-       }
-       
-       
-       /**
-        * Convenience constructor wraps given <code>Reader</code> 
-        * in a <code>BufferedReader</code>.
-        * @param reader a <code>Reader</code> for the content, not null
-        * @param name the name of the checked content, possibly null
-        */
-       public HeaderCheckWorker(Reader reader, final IHeaderMatcher matcher, 
final Document name) {
-               this(new BufferedReader(reader), matcher, name);
-       }
-       
-       public HeaderCheckWorker(BufferedReader reader, final IHeaderMatcher 
matcher,
+        this(new BufferedReader(reader), numberOfRetainedHeaderLine, matcher, 
name);
+    }
+
+
+    /**
+     * Convenience constructor wraps given <code>Reader</code>
+     * in a <code>BufferedReader</code>.
+     * @param reader a <code>Reader</code> for the content, not null
+     * @param name the name of the checked content, possibly null
+     */
+    public HeaderCheckWorker(Reader reader, final IHeaderMatcher matcher, 
final Document name) {
+        this(new BufferedReader(reader), matcher, name);
+    }
+
+    public HeaderCheckWorker(BufferedReader reader, final IHeaderMatcher 
matcher,
             final Document name) {
-               this(reader, DEFAULT_NUMBER_OF_RETAINED_HEADER_LINES, matcher, 
name);
-       }
-       
-       public HeaderCheckWorker(BufferedReader reader, int 
numberOfRetainedHeaderLine, final IHeaderMatcher matcher,
+        this(reader, DEFAULT_NUMBER_OF_RETAINED_HEADER_LINES, matcher, name);
+    }
+
+    public HeaderCheckWorker(BufferedReader reader, int 
numberOfRetainedHeaderLine, final IHeaderMatcher matcher,
             final Document name) {
-               this.reader = reader;
-               this.numberOfRetainedHeaderLines = numberOfRetainedHeaderLine;
-               this.matcher = matcher;
+        this.reader = reader;
+        this.numberOfRetainedHeaderLines = numberOfRetainedHeaderLine;
+        this.matcher = matcher;
         this.subject = name;
-       }
+    }
+
+    public boolean isFinished() {
+        return finished;
+    }
 
-       public boolean isFinished() {
-               return finished;
-       }
-
-       public void read() throws RatHeaderAnalysisException {
-               if (!finished) {
-                       final StringBuffer headers = new StringBuffer();
-                       headerLinesToRead = numberOfRetainedHeaderLines;
-                       try {
-                               while(readLine(headers));
-                               if (!match) {
-                                       final String notes = headers.toString();
+    public void read() throws RatHeaderAnalysisException {
+        if (!finished) {
+            final StringBuffer headers = new StringBuffer();
+            headerLinesToRead = numberOfRetainedHeaderLines;
+            try {
+                while(readLine(headers));
+                if (!match) {
+                    final String notes = headers.toString();
                     final MetaData metaData = subject.getMetaData();
                     metaData.set(new 
MetaData.Datum(MetaData.RAT_URL_HEADER_SAMPLE, notes));
                     metaData.set(new 
MetaData.Datum(MetaData.RAT_URL_HEADER_CATEGORY, 
MetaData.RAT_LICENSE_FAMILY_CATEGORY_VALUE_UNKNOWN));
                     
metaData.set(MetaData.RAT_LICENSE_FAMILY_NAME_DATUM_UNKNOWN);
-                               }
-                       } catch (IOException e) {
+                }
+            } catch (IOException e) {
                 throw new RatHeaderAnalysisException("Cannot read header for " 
+ subject, e);
             }
-                       try {
-                               reader.close();
-                       } catch (IOException e) {
-                               // swallow
-                       }
+            try {
+                reader.close();
+            } catch (IOException e) {
+                // swallow
+            }
             matcher.reset();
-               }
-               finished = true;
-       }
-       
-       boolean readLine(StringBuffer headers) throws IOException, 
RatHeaderAnalysisException {
-               String line = reader.readLine();
-               boolean result = line != null;
-               if (result) {
-                       if (headerLinesToRead-- > 0) {
-                               headers.append(line);
-                               headers.append('\n');
-                       }
+        }
+        finished = true;
+    }
+
+    boolean readLine(StringBuffer headers) throws IOException, 
RatHeaderAnalysisException {
+        String line = reader.readLine();
+        boolean result = line != null;
+        if (result) {
+            if (headerLinesToRead-- > 0) {
+                headers.append(line);
+                headers.append('\n');
+            }
             match = matcher.match(subject, line);
-                       result = !match;
-               }
-               return result;
-       }
+            result = !match;
+        }
+        return result;
+    }
 }

Modified: 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/IHeaderMatcher.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/IHeaderMatcher.java?rev=1396305&r1=1396304&r2=1396305&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/IHeaderMatcher.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/IHeaderMatcher.java
 Tue Oct  9 20:47:00 2012
@@ -26,18 +26,18 @@ import org.apache.rat.api.Document;
  */
 public interface IHeaderMatcher {
 
-       /**
-        * Resets this matches.
-        * Subsequent calls to {@link #match} will accumulate new text.
-        */
-       public void reset();
-       
-       /**
-        * Matches the text accumulated to licenses.
+    /**
+     * Resets this matches.
+     * Subsequent calls to {@link #match} will accumulate new text.
+     */
+    public void reset();
+
+    /**
+     * Matches the text accumulated to licenses.
      * TODO probably a poor design choice - hope to fix later
-        * @param subject TODO
-        * @param line next line of text, not null
-        * @return TODO
-        */
-       public boolean match(Document subject, String line) throws 
RatHeaderAnalysisException;
+     * @param subject TODO
+     * @param line next line of text, not null
+     * @return TODO
+     */
+    public boolean match(Document subject, String line) throws 
RatHeaderAnalysisException;
 }

Modified: 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/ApacheSoftwareLicense20.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/ApacheSoftwareLicense20.java?rev=1396305&r1=1396304&r2=1396305&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/ApacheSoftwareLicense20.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/ApacheSoftwareLicense20.java
 Tue Oct  9 20:47:00 2012
@@ -25,11 +25,11 @@ import org.apache.rat.api.MetaData;
  *
  */
 public final class ApacheSoftwareLicense20 extends SimplePatternBasedLicense {
-       public static final String FIRST_LICENSE_LINE = "Licensed under the 
Apache License, Version 2.0 (the \"License\")";
-       public static final String LICENSE_REFERENCE_LINE = 
"http://www.apache.org/licenses/LICENSE-2.0";;
-       
-       public ApacheSoftwareLicense20() {
-               super(MetaData.RAT_LICENSE_FAMILY_CATEGORY_DATUM_ASL, 
MetaData.RAT_LICENSE_FAMILY_NAME_DATUM_APACHE_LICENSE_VERSION_2_0,
-                       "", new String[]{FIRST_LICENSE_LINE, 
LICENSE_REFERENCE_LINE});
-       }
+    public static final String FIRST_LICENSE_LINE = "Licensed under the Apache 
License, Version 2.0 (the \"License\")";
+    public static final String LICENSE_REFERENCE_LINE = 
"http://www.apache.org/licenses/LICENSE-2.0";;
+
+    public ApacheSoftwareLicense20() {
+        super(MetaData.RAT_LICENSE_FAMILY_CATEGORY_DATUM_ASL, 
MetaData.RAT_LICENSE_FAMILY_NAME_DATUM_APACHE_LICENSE_VERSION_2_0,
+                "", new String[]{FIRST_LICENSE_LINE, LICENSE_REFERENCE_LINE});
+    }
 }

Modified: 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL1License.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL1License.java?rev=1396305&r1=1396304&r2=1396305&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL1License.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL1License.java
 Tue Oct  9 20:47:00 2012
@@ -24,14 +24,14 @@ import org.apache.rat.api.MetaData;
  * Licence matches GPL1 or later.
  */
 public class GPL1License extends FullTextMatchingLicense {
-       public static final String FIRST_LICENSE_LINE = "This program is free 
software; you can redistribute it and/or modify\n" +
+    public static final String FIRST_LICENSE_LINE = "This program is free 
software; you can redistribute it and/or modify\n" +
             " it under the terms of the GNU General Public License as 
published by\n" +
             " the Free Software Foundation; either version 1, or (at your 
option)\n" +
             " any later version.";
 
-       public GPL1License() {
-               super(MetaData.RAT_LICENSE_FAMILY_CATEGORY_DATUM_GPL1,
+    public GPL1License() {
+        super(MetaData.RAT_LICENSE_FAMILY_CATEGORY_DATUM_GPL1,
                 MetaData.RAT_LICENSE_FAMILY_NAME_DATUM_GPL_VERSION_1,
-                       "", FIRST_LICENSE_LINE);
-       }
+                "", FIRST_LICENSE_LINE);
+    }
 }
\ No newline at end of file

Modified: 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL2License.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL2License.java?rev=1396305&r1=1396304&r2=1396305&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL2License.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL2License.java
 Tue Oct  9 20:47:00 2012
@@ -24,14 +24,14 @@ import org.apache.rat.api.MetaData;
  * Licence matches GPL2 or later.
  */
 public class GPL2License extends FullTextMatchingLicense {
-       public static final String FIRST_LICENSE_LINE = "This program is free 
software; you can redistribute it and/or\n" +
+    public static final String FIRST_LICENSE_LINE = "This program is free 
software; you can redistribute it and/or\n" +
             " modify it under the terms of the GNU General Public License\n" +
             " as published by the Free Software Foundation; either version 
2\n" +
             " of the License, or (at your option) any later version.";
 
-       public GPL2License() {
-               super(MetaData.RAT_LICENSE_FAMILY_CATEGORY_DATUM_GPL2,
+    public GPL2License() {
+        super(MetaData.RAT_LICENSE_FAMILY_CATEGORY_DATUM_GPL2,
                 MetaData.RAT_LICENSE_FAMILY_NAME_DATUM_GPL_VERSION_2,
-                       "", FIRST_LICENSE_LINE);
-       }
+                "", FIRST_LICENSE_LINE);
+    }
 }

Modified: 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL3License.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL3License.java?rev=1396305&r1=1396304&r2=1396305&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL3License.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/GPL3License.java
 Tue Oct  9 20:47:00 2012
@@ -24,14 +24,14 @@ import org.apache.rat.api.MetaData;
  * Licence matches GPL3 or later.
  */
 public class GPL3License extends FullTextMatchingLicense {
-       public static final String FIRST_LICENSE_LINE = "This program is free 
software: you can redistribute it and/or modify\n" +
+    public static final String FIRST_LICENSE_LINE = "This program is free 
software: you can redistribute it and/or modify\n" +
             " it under the terms of the GNU General Public License as 
published by\n" +
             " the Free Software Foundation, either version 3 of the License, 
or\n" +
             " (at your option) any later version.";
 
-       public GPL3License() {
-               super(MetaData.RAT_LICENSE_FAMILY_CATEGORY_DATUM_GPL3,
+    public GPL3License() {
+        super(MetaData.RAT_LICENSE_FAMILY_CATEGORY_DATUM_GPL3,
                 MetaData.RAT_LICENSE_FAMILY_NAME_DATUM_GPL_VERSION_3,
-                       "", FIRST_LICENSE_LINE);
-       }
+                "", FIRST_LICENSE_LINE);
+    }
 }

Modified: 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/MITLicense.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/MITLicense.java?rev=1396305&r1=1396304&r2=1396305&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/MITLicense.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/license/MITLicense.java
 Tue Oct  9 20:47:00 2012
@@ -24,13 +24,13 @@ import org.apache.rat.api.MetaData;
  * Base MIT license (all 3 parts).
  */
 public class MITLicense extends FullTextMatchingLicense {
-       public static final String FIRST_LICENSE_LINE = "Permission is hereby 
granted, free of charge, to any person obtaining a copy of this software and 
associated documentation files (the \"Software\"), to deal in the Software 
without restriction, including without limitation the rights to use, copy, 
modify, merge, publish, distribute, sublicense, and/or sell copies of the 
Software, and to permit persons to whom the Software is furnished to do so, 
subject to the following conditions:";
+    public static final String FIRST_LICENSE_LINE = "Permission is hereby 
granted, free of charge, to any person obtaining a copy of this software and 
associated documentation files (the \"Software\"), to deal in the Software 
without restriction, including without limitation the rights to use, copy, 
modify, merge, publish, distribute, sublicense, and/or sell copies of the 
Software, and to permit persons to whom the Software is furnished to do so, 
subject to the following conditions:";
     public static final String MIDDLE_LICENSE_LINE = "The above copyright 
notice and this permission notice shall be included in all copies or 
substantial portions of the Software.";
     public static final String AS_IS_LICENSE_LINE = "THE SOFTWARE IS PROVIDED 
\"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 
AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.";
 
-       public MITLicense() {
-               super(MetaData.RAT_LICENSE_FAMILY_CATEGORY_DATUM_MIT,
+    public MITLicense() {
+        super(MetaData.RAT_LICENSE_FAMILY_CATEGORY_DATUM_MIT,
                 MetaData.RAT_LICENSE_FAMILY_NAME_DATUM_MIT,
-                       "", FIRST_LICENSE_LINE + MIDDLE_LICENSE_LINE + 
AS_IS_LICENSE_LINE);
-       }
+                "", FIRST_LICENSE_LINE + MIDDLE_LICENSE_LINE + 
AS_IS_LICENSE_LINE);
+    }
 }

Modified: 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/util/HeaderMatcherMultiplexer.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/util/HeaderMatcherMultiplexer.java?rev=1396305&r1=1396304&r2=1396305&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/util/HeaderMatcherMultiplexer.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/analysis/util/HeaderMatcherMultiplexer.java
 Tue Oct  9 20:47:00 2012
@@ -28,29 +28,29 @@ import org.apache.rat.api.Document;
  */
 public final class HeaderMatcherMultiplexer implements IHeaderMatcher {
 
-       private final IHeaderMatcher[] matchers;
-       private final int numberOfMatchers;
-       
-       public HeaderMatcherMultiplexer(final IHeaderMatcher[] matchers) {
-               this.matchers = matchers;
-               numberOfMatchers = matchers.length;
-       }
-       
-       public boolean match(Document subject, String line) throws 
RatHeaderAnalysisException {
+    private final IHeaderMatcher[] matchers;
+    private final int numberOfMatchers;
+
+    public HeaderMatcherMultiplexer(final IHeaderMatcher[] matchers) {
+        this.matchers = matchers;
+        numberOfMatchers = matchers.length;
+    }
+
+    public boolean match(Document subject, String line) throws 
RatHeaderAnalysisException {
         boolean result = false;
-               for (int i=0;i<numberOfMatchers;i++) {
-                       result = matchers[i].match(subject, line);
+        for (int i=0;i<numberOfMatchers;i++) {
+            result = matchers[i].match(subject, line);
             if (result) {
                 break;
             }
-               }
+        }
         return result;
-       }
+    }
 
-       public void reset() {
-               for (int i=0;i<numberOfMatchers;i++) {
-                       matchers[i].reset();
-               }
-       }
+    public void reset() {
+        for (int i=0;i<numberOfMatchers;i++) {
+            matchers[i].reset();
+        }
+    }
 
 }

Modified: 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/AbstractMonolithicDocument.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/AbstractMonolithicDocument.java?rev=1396305&r1=1396304&r2=1396305&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/AbstractMonolithicDocument.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/AbstractMonolithicDocument.java
 Tue Oct  9 20:47:00 2012
@@ -26,21 +26,21 @@ import org.apache.rat.api.MetaData;
  * Abstract base class for monolithic documents.
  */
 public abstract class AbstractMonolithicDocument implements Document {
-       private final String name;
-       private final MetaData metaData;
+    private final String name;
+    private final MetaData metaData;
 
-       public AbstractMonolithicDocument(String pName) {
-               name = pName;
+    public AbstractMonolithicDocument(String pName) {
+        name = pName;
         this.metaData = new MetaData();
-       }
+    }
 
-       public boolean isComposite() {
+    public boolean isComposite() {
         return false;
     }
 
     public String getName() {
-               return name;
-       }
+        return name;
+    }
 
     public MetaData getMetaData() {
         return metaData;

Modified: 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/ArchiveEntryDocument.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/ArchiveEntryDocument.java?rev=1396305&r1=1396304&r2=1396305&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/ArchiveEntryDocument.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/ArchiveEntryDocument.java
 Tue Oct  9 20:47:00 2012
@@ -31,37 +31,37 @@ import org.apache.rat.api.MetaData;
 import org.apache.rat.api.RatException;
 
 public class ArchiveEntryDocument implements Document {
-       
-       private byte[] contents;
+
+    private byte[] contents;
     private final String name;
 
     private final MetaData metaData = new MetaData();
 
-       public ArchiveEntryDocument(File file, byte[] contents) throws 
RatException {
-               super();
-               name = DocumentImplUtils.toName(file);
-               this.contents = contents;
-       }
-       
-       public MetaData getMetaData() {
-               return metaData;
-       }
-
-       public String getName() {
-               return name;
-       }
-
-       public InputStream inputStream() throws IOException {
-               return new ByteArrayInputStream(contents);
-       }
-
-       public boolean isComposite() {
-               return DocumentImplUtils.isZipStream(new 
ByteArrayInputStream(contents));
-       }
-
-       public Reader reader() throws IOException {
-               return new InputStreamReader(new 
ByteArrayInputStream(contents));
-       }
+    public ArchiveEntryDocument(File file, byte[] contents) throws 
RatException {
+        super();
+        name = DocumentImplUtils.toName(file);
+        this.contents = contents;
+    }
+
+    public MetaData getMetaData() {
+        return metaData;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public InputStream inputStream() throws IOException {
+        return new ByteArrayInputStream(contents);
+    }
+
+    public boolean isComposite() {
+        return DocumentImplUtils.isZipStream(new 
ByteArrayInputStream(contents));
+    }
+
+    public Reader reader() throws IOException {
+        return new InputStreamReader(new ByteArrayInputStream(contents));
+    }
 
 
     /**

Modified: 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/DocumentImplUtils.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/DocumentImplUtils.java?rev=1396305&r1=1396304&r2=1396305&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/DocumentImplUtils.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/DocumentImplUtils.java
 Tue Oct  9 20:47:00 2012
@@ -34,15 +34,15 @@ public class DocumentImplUtils {
     }
     
     public static final boolean isZipStream(InputStream stream) {
-       ZipInputStream zip = new ZipInputStream(stream);
-       try {
-                       zip.getNextEntry();
-                       return true;
+        ZipInputStream zip = new ZipInputStream(stream);
+        try {
+            zip.getNextEntry();
+            return true;
         } catch (ZipException e) {
             return false;
-               } catch (IOException e) {
-                       return false;
-               } finally {
+        } catch (IOException e) {
+            return false;
+        } finally {
             if (zip != null) {
                 try {
                     zip.close();
@@ -50,12 +50,12 @@ public class DocumentImplUtils {
                     // Swallow
                 }
             }
-               }
+        }
     }
 
     public static final boolean isZip(File file) {
         try {
-               return isZipStream(new FileInputStream(file));
+            return isZipStream(new FileInputStream(file));
         } catch (IOException e) {
             return false;
         }

Modified: 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/MonolithicFileDocument.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/MonolithicFileDocument.java?rev=1396305&r1=1396304&r2=1396305&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/MonolithicFileDocument.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/MonolithicFileDocument.java
 Tue Oct  9 20:47:00 2012
@@ -31,30 +31,30 @@ import org.apache.rat.api.Document;
 
 
 public class MonolithicFileDocument extends AbstractMonolithicDocument {
-       private final File file;
+    private final File file;
 
     /**
      * Creates a new instance. The document is read from the
      * given URL.
      */
     public static Document newInstance(final URL url) {
-       if ("file".equals(url.getProtocol())) {
-               final File f = new File(url.getFile());
-               return new MonolithicFileDocument(f);
-       }
-       return new AbstractMonolithicDocument(url.toExternalForm()){
-                       public Reader reader() throws IOException {
-                               return new InputStreamReader(inputStream(), 
"UTF-8");
-                       }
+        if ("file".equals(url.getProtocol())) {
+            final File f = new File(url.getFile());
+            return new MonolithicFileDocument(f);
+        }
+        return new AbstractMonolithicDocument(url.toExternalForm()){
+            public Reader reader() throws IOException {
+                return new InputStreamReader(inputStream(), "UTF-8");
+           }
 
             public InputStream inputStream() throws IOException {
                 return url.openStream();
             }
-       };
+        };
     }
 
     public MonolithicFileDocument(final File file) {
-       super(DocumentImplUtils.toName(file));
+        super(DocumentImplUtils.toName(file));
         this.file = file;
     }
 

Modified: 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/walker/ArchiveWalker.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/walker/ArchiveWalker.java?rev=1396305&r1=1396304&r2=1396305&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/walker/ArchiveWalker.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/walker/ArchiveWalker.java
 Tue Oct  9 20:47:00 2012
@@ -41,7 +41,7 @@ import org.apache.rat.report.RatReport;
  * Walks various kinds of archives files
  */
 public class ArchiveWalker extends Walker implements IReportable {
-       
+
     /**
      * Constructs a walker.
      * @param file not null
@@ -62,46 +62,46 @@ public class ArchiveWalker extends Walke
      * 
      */
     public void run(final RatReport report) throws RatException {
-       
-               try {
-                       ArchiveInputStream input;
-               
+
+        try {
+            ArchiveInputStream input;
+
             /* I am really sad that classes aren't first-class objects in
                Java :'( */
-                       try {
-                               input = new TarArchiveInputStream(new 
GzipCompressorInputStream(new FileInputStream(file)));
-                       } catch (IOException e) {
-                               try {
-                                       input = new TarArchiveInputStream(new 
BZip2CompressorInputStream(new FileInputStream(file)));
-                               } catch (IOException e2) {
-                                       input = new ZipArchiveInputStream(new 
FileInputStream(file));
-                               }
-                       }
-
-                       ArchiveEntry entry = input.getNextEntry();
-           while (entry != null) {
-               File f = new File(entry.getName());
-               byte[] contents = new byte[(int) entry.getSize()];
-               int offset = 0;
-               int length = contents.length;
-
-               while (offset < entry.getSize()) {
-                       int actualRead = input.read(contents, offset, length);
-                       length -= actualRead;
-                       offset += actualRead;
-               }
-               
-               if (!entry.isDirectory() && !ignored(f)) {
-                       report(report, contents, f);
-               }
-
-                       entry = input.getNextEntry();
-           }
-           
-           input.close();
-               } catch (IOException e) {
-                       throw new RatException(e);
-               }
+            try {
+                input = new TarArchiveInputStream(new 
GzipCompressorInputStream(new FileInputStream(file)));
+            } catch (IOException e) {
+                try {
+                    input = new TarArchiveInputStream(new 
BZip2CompressorInputStream(new FileInputStream(file)));
+                } catch (IOException e2) {
+                    input = new ZipArchiveInputStream(new 
FileInputStream(file));
+                }
+            }
+
+            ArchiveEntry entry = input.getNextEntry();
+            while (entry != null) {
+                File f = new File(entry.getName());
+                byte[] contents = new byte[(int) entry.getSize()];
+                int offset = 0;
+                int length = contents.length;
+
+                while (offset < entry.getSize()) {
+                    int actualRead = input.read(contents, offset, length);
+                    length -= actualRead;
+                    offset += actualRead;
+                }
+
+                if (!entry.isDirectory() && !ignored(f)) {
+                    report(report, contents, f);
+                }
+
+                entry = input.getNextEntry();
+            }
+
+            input.close();
+        } catch (IOException e) {
+            throw new RatException(e);
+        }
     }
 
     /**

Modified: 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/walker/DirectoryWalker.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/walker/DirectoryWalker.java?rev=1396305&r1=1396304&r2=1396305&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/walker/DirectoryWalker.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/walker/DirectoryWalker.java
 Tue Oct  9 20:47:00 2012
@@ -36,11 +36,11 @@ import java.util.regex.Pattern;
 public class DirectoryWalker extends Walker implements IReportable {
 
     protected static final FileNameComparator COMPARATOR = new 
FileNameComparator();
-       
-       public DirectoryWalker(File file) {
-           this(file, (FilenameFilter) null);
-       }
-       
+
+    public DirectoryWalker(File file) {
+        this(file, (FilenameFilter) null);
+    }
+
     /**
      * Constructs a walker.
      * @param file not null
@@ -54,18 +54,18 @@ public class DirectoryWalker extends Wal
     public DirectoryWalker(File file, final Pattern ignoreNameRegex) {
         super(file.getPath(), file, regexFilter(ignoreNameRegex));
     }
-       
+
     public boolean isRestricted() {
         return false;
     }
    
-         /**
-          * Process a directory, restricted directories will be ignored.
-          * 
-          * @param report The report to process the directory with
-          * @param file the directory to process
-          * @throws RatException
-          */
+    /**
+     * Process a directory, restricted directories will be ignored.
+     *
+     * @param report The report to process the directory with
+     * @param file the directory to process
+     * @throws RatException
+     */
     private void processDirectory(RatReport  report, final File file) throws 
RatException {
         if (!isRestricted(file)) {
             process(report, file);

Modified: 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/walker/Walker.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/walker/Walker.java?rev=1396305&r1=1396304&r2=1396305&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/walker/Walker.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/walker/Walker.java
 Tue Oct  9 20:47:00 2012
@@ -29,12 +29,12 @@ import org.apache.rat.report.IReportable
  * Abstract walker.
  */
 public abstract class Walker implements IReportable {
-       
+
     protected final File file;
     protected final String name;
 
     protected final FilenameFilter filter;
-       
+
     protected static FilenameFilter regexFilter(final Pattern pattern) {
         return new FilenameFilter() {
             public boolean accept(File dir, String name) {
@@ -48,12 +48,12 @@ public abstract class Walker implements 
             }
         };
     }
-       
-       protected boolean isRestricted(File file) {
-               String name = file.getName();
-               boolean result = name.startsWith(".");
-               return result;
-       }
+
+    protected boolean isRestricted(File file) {
+        String name = file.getName();
+        boolean result = name.startsWith(".");
+        return result;
+    }
  
     protected final boolean ignored(final File file) {
         boolean result = false;
@@ -64,11 +64,11 @@ public abstract class Walker implements 
         }
         return result;
     }
-        
+
     public Walker(File file, final FilenameFilter filter) {
         this(file.getPath(), file, filter);
     }
-       
+
     protected Walker(final String name, final File file, final FilenameFilter 
filter) {
         this.name = name;
         this.file = file;


Reply via email to