You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@creadur.apache.org by po...@apache.org on 2015/05/25 00:05:01 UTC

svn commit: r1681534 [1/2] - in /creadur/rat/trunk: ./ apache-rat-core/src/main/java/org/apache/rat/ apache-rat-core/src/main/java/org/apache/rat/analysis/license/ apache-rat-core/src/main/java/org/apache/rat/annotation/ apache-rat-core/src/test/java/o...

Author: pottlinger
Date: Sun May 24 22:05:01 2015
New Revision: 1681534

URL: http://svn.apache.org/r1681534
Log:
RAT-203: Replace licence by license

* Use license in documentation, javadoc and comments to not confuse users.
* TODO: Rename classes after this commit.
* Deprecated CLI option appendLicence will remain active,
  works like appendLicense.

Modified:
    creadur/rat/trunk/RELEASE_NOTES.txt
    creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.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/annotation/AbstractLicenceAppender.java
    creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/annotation/ApacheV2LicenceAppender.java
    creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/analysis/license/CDDL1LicenseTest.java
    creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/analysis/license/GPL123LicenseTest.java
    creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/analysis/license/MITLicenseTest.java
    creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/annotation/TestLicenceAppender.java
    creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/BinaryGuesserTest.java
    creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
    creadur/rat/trunk/apache-rat-tasks/src/site/apt/examples/basic.apt.vm
    creadur/rat/trunk/apache-rat/README-CLI.txt
    creadur/rat/trunk/apache-rat/pom.xml
    creadur/rat/trunk/apache-rat/src/site/apt/index.apt.vm

Modified: creadur/rat/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/creadur/rat/trunk/RELEASE_NOTES.txt?rev=1681534&r1=1681533&r2=1681534&view=diff
==============================================================================
--- creadur/rat/trunk/RELEASE_NOTES.txt (original)
+++ creadur/rat/trunk/RELEASE_NOTES.txt Sun May 24 22:05:01 2015
@@ -52,6 +52,7 @@ Rat 0.12 (SNAPSHOT)
     * [RAT-201] - BinaryGuesser should treat *.swf as binary. 
                   Furthermore BinaryGuesser falls back to UTF-8 encoding in case the encoding given via system property (-Dfile.encoding) was not found.
     * [RAT-202] - Report layout differs between successful RAT checks and existence of unapproved files.
+    * [RAT-203] - Using 'license' in README, source code, javadoc, comments and site instead of 'licence'; improve terminology to not confuse RAT consumers.
 
 Rat 0.11
 ========
@@ -264,6 +265,4 @@ Rat 0.3 Notes
  * This is the last release with the original hacked together plain test report.
    The new XML reporting code is present but is not yet the default.
  * Rat 0.3 is the first release with release notes. All previous releases are
-   now consigned to Ancient History. No record of them will be found here.
-
-
+   now consigned to Ancient History. No record of them will be found here.
\ No newline at end of file

Modified: creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java
URL: http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java?rev=1681534&r1=1681533&r2=1681534&view=diff
==============================================================================
--- creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java (original)
+++ creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java Sun May 24 22:05:01 2015
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat;
 
 import org.apache.commons.cli.CommandLine;
@@ -42,7 +42,17 @@ import org.apache.rat.walker.ArchiveWalk
 import org.apache.rat.walker.DirectoryWalker;
 
 import javax.xml.transform.TransformerConfigurationException;
-import java.io.*;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStreamWriter;
+import java.io.PipedReader;
+import java.io.PipedWriter;
+import java.io.PrintStream;
+import java.io.Writer;
 import java.util.List;
 
 
@@ -90,8 +100,7 @@ public class Report {
                     final FilenameFilter filter = new NotFileFilter(new WildcardFileFilter(excludes));
                     report.setInputFileFilter(filter);
                 }
-            }
-            else if (cl.hasOption(EXCLUDE_FILE_CLI)) {
+            } else if (cl.hasOption(EXCLUDE_FILE_CLI)) {
                 String excludeFileName = cl.getOptionValue(EXCLUDE_FILE_CLI);
                 if (excludeFileName != null) {
                     List<String> excludes = FileUtils.readLines(new File(excludeFileName));
@@ -121,7 +130,7 @@ public class Report {
                                 configuration);
                     } catch (FileNotFoundException fnfe) {
                         System.err.println("stylesheet " + style[0]
-                                           + " doesn't exist");
+                                + " doesn't exist");
                         System.exit(1);
                     }
                 }
@@ -133,66 +142,69 @@ public class Report {
         Options opts = new Options();
 
         Option help = new Option("h", "help", false,
-        "Print help for the Rat command line interface and exit");
+                "Print help for the Rat command line interface and exit");
         opts.addOption(help);
 
-        OptionGroup addLicenceGroup = new OptionGroup();
-        String addLicenceDesc = "Add the default licence header to any file with an unknown licence that is not in the exclusion list. By default new files will be created with the licence header, to force the modification of existing files use the --force option.";
+        OptionGroup addLicenseGroup = new OptionGroup();
+        String addLicenseDesc = "Add the default license header to any file with an unknown license that is not in the exclusion list. " +
+                "By default new files will be created with the license header, " +
+                "to force the modification of existing files use the --force option.";
 
+        // RAT-85/RAT-203: Deprecated! added only for convenience and for backwards compatibility
         Option addLicence = new Option(
                 "a",
                 "addLicence",
                 false,
-                addLicenceDesc);
-        addLicenceGroup.addOption(addLicence);
+                addLicenseDesc);
+        addLicenseGroup.addOption(addLicence);
         Option addLicense = new Option(
                 "A",
                 "addLicense",
                 false,
-                addLicenceDesc);
-        addLicenceGroup.addOption(addLicense);
-        opts.addOptionGroup(addLicenceGroup);
+                addLicenseDesc);
+        addLicenseGroup.addOption(addLicense);
+        opts.addOptionGroup(addLicenseGroup);
 
         Option write = new Option(
                 "f",
                 "force",
                 false,
-        "Forces any changes in files to be written directly to the source files (i.e. new files are not created)");
+                "Forces any changes in files to be written directly to the source files (i.e. new files are not created)");
         opts.addOption(write);
 
         Option copyright = new Option(
                 "c",
                 "copyright",
                 true,
-        "The copyright message to use in the licence headers, usually in the form of \"Copyright 2008 Foo\"");
+                "The copyright message to use in the license headers, usually in the form of \"Copyright 2008 Foo\"");
         opts.addOption(copyright);
 
         @SuppressWarnings("static-access") // ignore OptionBuilder design fault
         final Option exclude = OptionBuilder
-                            .withArgName("expression")
-                            .withLongOpt("exclude")
-                            .hasArgs()
-                            .withDescription("Excludes files matching wildcard <expression>. " +
-                                    "Note that --dir is required when using this parameter. " +
-                                    "Allows multiple arguments.")
-                            .create(EXCLUDE_CLI);
+                .withArgName("expression")
+                .withLongOpt("exclude")
+                .hasArgs()
+                .withDescription("Excludes files matching wildcard <expression>. " +
+                        "Note that --dir is required when using this parameter. " +
+                        "Allows multiple arguments.")
+                .create(EXCLUDE_CLI);
         opts.addOption(exclude);
 
         @SuppressWarnings("static-access") // ignore OptionBuilder design fault
         final Option excludeFile = OptionBuilder
-                            .withArgName("fileName")
-                            .withLongOpt("exclude-file")
-                            .hasArgs()
-                            .withDescription("Excludes files matching regular expression in <file> " +
-                                    "Note that --dir is required when using this parameter. " )
-                            .create(EXCLUDE_FILE_CLI);
+                .withArgName("fileName")
+                .withLongOpt("exclude-file")
+                .hasArgs()
+                .withDescription("Excludes files matching regular expression in <file> " +
+                        "Note that --dir is required when using this parameter. ")
+                .create(EXCLUDE_FILE_CLI);
         opts.addOption(excludeFile);
 
         Option dir = new Option(
                 "d",
                 "dir",
                 false,
-        "Used to indicate source when using --exclude");
+                "Used to indicate source when using --exclude");
         opts.addOption(dir);
 
         OptionGroup outputType = new OptionGroup();
@@ -205,10 +217,10 @@ public class Report {
         outputType.addOption(xml);
 
         Option xslt = new Option(String.valueOf(STYLESHEET_CLI),
-                                 "stylesheet",
-                                 true,
-                                 "XSLT stylesheet to use when creating the"
-                                 + " report.  Not compatible with -x");
+                "stylesheet",
+                true,
+                "XSLT stylesheet to use when creating the"
+                        + " report.  Not compatible with -x");
         outputType.addOption(xslt);
         opts.addOptionGroup(outputType);
 
@@ -225,7 +237,7 @@ public class Report {
         footer.append("Rat is also rather memory hungry ATM\n");
         footer.append("Rat is very basic ATM\n");
         footer.append("Rat highlights possible issues\n");
-        footer.append("Rat reports require intepretation\n");
+        footer.append("Rat reports require interpretation\n");
         footer.append("Rat often requires some tuning before it runs well against a project\n");
         footer.append("Rat relies on heuristics: it may miss issues\n");
 
@@ -244,6 +256,7 @@ public class Report {
 
     /**
      * Gets the current filter used to select files.
+     *
      * @return current file filter, or null when no filter has been set
      */
     public FilenameFilter getInputFileFilter() {
@@ -252,6 +265,7 @@ public class Report {
 
     /**
      * Sets the current filter used to select files.
+     *
      * @param inputFileFilter filter, or null when no filter has been set
      */
     public void setInputFileFilter(FilenameFilter inputFileFilter) {
@@ -260,11 +274,9 @@ public class Report {
 
     /**
      * @param out - the output stream to receive the styled report
+     * @return the currently collected numerical statistics.
      * @throws Exception in case of errors.
-     * 
      * @deprecated use {@link #report(PrintStream, ReportConfiguration)} instead
-     * 
-     * @return the currently collected numerical statistics.
      */
     @Deprecated
     public ClaimStatistic report(PrintStream out) throws Exception {
@@ -275,16 +287,15 @@ public class Report {
     }
 
     /**
-     * @param out - the output stream to receive the styled report
+     * @param out           - the output stream to receive the styled report
      * @param configuration - current configuration options.
+     * @return the currently collected numerical statistics.
      * @throws Exception in case of errors.
-     * 
      * @since Rat 0.8
-     * @return the currently collected numerical statistics.
      */
     public ClaimStatistic report(PrintStream out,
                                  ReportConfiguration configuration)
-        throws Exception {
+            throws Exception {
         final IReportable base = getDirectory(out);
         if (base != null) {
             return report(base, new OutputStreamWriter(out), configuration);
@@ -299,7 +310,7 @@ public class Report {
             out.print(baseDirectory);
             out.print(" does not exist.\n");
             return null;
-        } 
+        }
 
         if (base.isDirectory()) {
             return new DirectoryWalker(base, inputFileFilter);
@@ -316,9 +327,9 @@ public class Report {
     }
 
     /**
-     * Output a report in the default style and default licence
-     * header matcher. 
-     * 
+     * Output a report in the default style and default license
+     * header matcher.
+     *
      * @param out - the output stream to receive the styled report
      * @throws Exception in case of errors.
      * @deprecated use {@link #styleReport(PrintStream, ReportConfiguration)} instead
@@ -332,17 +343,17 @@ public class Report {
     }
 
     /**
-     * Output a report in the default style and default licence
-     * header matcher. 
-     * 
-     * @param out - the output stream to receive the styled report
+     * Output a report in the default style and default license
+     * header matcher.
+     *
+     * @param out           - the output stream to receive the styled report
      * @param configuration the configuration to use
      * @throws Exception in case of errors.
      * @since Rat 0.8
      */
     public void styleReport(PrintStream out,
                             ReportConfiguration configuration)
-        throws Exception {
+            throws Exception {
         final IReportable base = getDirectory(out);
         if (base != null) {
             InputStream style = Defaults.getDefaultStyleSheet();
@@ -352,42 +363,38 @@ public class Report {
 
     /**
      * Output a report that is styled using a defined stylesheet.
-     * 
-     * @param out the stream to write the report to
-     * @param base the files or directories to report on
-     * @param style an input stream representing the stylesheet to use for styling the report
+     *
+     * @param out            the stream to write the report to
+     * @param base           the files or directories to report on
+     * @param style          an input stream representing the stylesheet to use for styling the report
      * @param pConfiguration current report configuration.
-     * 
-     * @throws IOException in case of I/O errors.
+     * @throws IOException                       in case of I/O errors.
      * @throws TransformerConfigurationException in case of XML errors.
-     * @throws InterruptedException in case of threading errors.
-     * @throws RatException in case of internal errors.
+     * @throws InterruptedException              in case of threading errors.
+     * @throws RatException                      in case of internal errors.
      */
     public static void report(PrintStream out, IReportable base, final InputStream style,
-                              ReportConfiguration pConfiguration) 
-            throws IOException, TransformerConfigurationException,  InterruptedException, RatException {
+                              ReportConfiguration pConfiguration)
+            throws IOException, TransformerConfigurationException, InterruptedException, RatException {
         report(new OutputStreamWriter(out), base, style, pConfiguration);
     }
 
     /**
-     * 
      * Output a report that is styled using a defined stylesheet.
-     * 
-     * @param out the writer to write the report to
-     * @param base the files or directories to report on
-     * @param style an input stream representing the stylesheet to use for styling the report
+     *
+     * @param out            the writer to write the report to
+     * @param base           the files or directories to report on
+     * @param style          an input stream representing the stylesheet to use for styling the report
      * @param pConfiguration current report configuration.
-     * 
-     * @throws IOException in case of I/O errors.
-     * @throws TransformerConfigurationException in case of XML errors.
-     * @throws InterruptedException in case of threading errors.
-     * @throws RatException in case of internal errors.
-     * 
      * @return the currently collected numerical statistics.
+     * @throws IOException                       in case of I/O errors.
+     * @throws TransformerConfigurationException in case of XML errors.
+     * @throws InterruptedException              in case of threading errors.
+     * @throws RatException                      in case of internal errors.
      */
-    public static ClaimStatistic report(Writer out, IReportable base, final InputStream style, 
-            ReportConfiguration pConfiguration) 
-    throws IOException, TransformerConfigurationException, InterruptedException, RatException {
+    public static ClaimStatistic report(Writer out, IReportable base, final InputStream style,
+                                        ReportConfiguration pConfiguration)
+            throws IOException, TransformerConfigurationException, InterruptedException, RatException {
         PipedReader reader = new PipedReader();
         PipedWriter writer = new PipedWriter(reader);
         ReportTransformer transformer = new ReportTransformer(out, style, reader);
@@ -401,18 +408,15 @@ public class Report {
     }
 
     /**
-     * 
-     * @param container the files or directories to report on
-     * @param out the writer to write the report to
+     * @param container      the files or directories to report on
+     * @param out            the writer to write the report to
      * @param pConfiguration current report configuration.
-     * 
-     * @throws IOException in case of I/O errors.
-     * @throws RatException in case of internal errors.
-     * 
      * @return the currently collected numerical statistics.
+     * @throws IOException  in case of I/O errors.
+     * @throws RatException in case of internal errors.
      */
     public static ClaimStatistic report(final IReportable container, final Writer out,
-            ReportConfiguration pConfiguration) throws IOException, RatException {
+                                        ReportConfiguration pConfiguration) throws IOException, RatException {
         IXmlWriter writer = new XmlWriter(out);
         final ClaimStatistic statistic = new ClaimStatistic();
         RatReport report = XmlReportFactory.createStandardReport(writer, statistic, pConfiguration);

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=1681534&r1=1681533&r2=1681534&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 Sun May 24 22:05:01 2015
@@ -15,13 +15,13 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.analysis.license;
 
 import org.apache.rat.api.MetaData;
 
 /**
- * Licence matches GPL1 or later.
+ * License 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" +

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=1681534&r1=1681533&r2=1681534&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 Sun May 24 22:05:01 2015
@@ -15,13 +15,13 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.analysis.license;
 
 import org.apache.rat.api.MetaData;
 
 /**
- * Licence matches GPL2 or later.
+ * License 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" +

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=1681534&r1=1681533&r2=1681534&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 Sun May 24 22:05:01 2015
@@ -15,13 +15,13 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.analysis.license;
 
 import org.apache.rat.api.MetaData;
 
 /**
- * Licence matches GPL3 or later.
+ * License 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" +

Modified: creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/annotation/AbstractLicenceAppender.java
URL: http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/annotation/AbstractLicenceAppender.java?rev=1681534&r1=1681533&r2=1681534&view=diff
==============================================================================
--- creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/annotation/AbstractLicenceAppender.java (original)
+++ creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/annotation/AbstractLicenceAppender.java Sun May 24 22:05:01 2015
@@ -32,11 +32,10 @@ import java.util.HashMap;
 import java.util.Map;
 
 /**
- * Add a licence header to a document. This appender does not check for the
- * existence of an existing licence header, it is assumed that either a second
- * licence header is intentional or that there is no licence header present
+ * Add a license header to a document. This appender does not check for the
+ * existence of an existing license header, it is assumed that either a second
+ * license header is intentional or that there is no license header present
  * already.
- *
  */
 public abstract class AbstractLicenceAppender {
     private static final String DOT = ".";
@@ -67,47 +66,49 @@ public abstract class AbstractLicenceApp
     private static final int TYPE_JSP = 24;
     private static final int TYPE_FML = 25;
 
-    /** the line separator for this OS */
+    /**
+     * the line separator for this OS
+     */
     private static final String LINE_SEP = System.getProperty("line.separator");
 
-    private static final int[] FAMILY_C = new int[] {
-        TYPE_JAVA, TYPE_JAVASCRIPT, TYPE_C, TYPE_H, TYPE_SCALA,
-        TYPE_CSS, TYPE_CPP, TYPE_CSHARP, TYPE_PHP, TYPE_GROOVY,
-        TYPE_BEANSHELL,
+    private static final int[] FAMILY_C = new int[]{
+            TYPE_JAVA, TYPE_JAVASCRIPT, TYPE_C, TYPE_H, TYPE_SCALA,
+            TYPE_CSS, TYPE_CPP, TYPE_CSHARP, TYPE_PHP, TYPE_GROOVY,
+            TYPE_BEANSHELL,
     };
-    private static final int[] FAMILY_SGML = new int[] {
-        TYPE_XML, TYPE_HTML, TYPE_JSP, TYPE_FML,
+    private static final int[] FAMILY_SGML = new int[]{
+            TYPE_XML, TYPE_HTML, TYPE_JSP, TYPE_FML,
     };
-    private static final int[] FAMILY_SH = new int[] {
-        TYPE_PROPERTIES, TYPE_PYTHON, TYPE_SH, TYPE_RUBY, TYPE_PERL,
-        TYPE_TCL, TYPE_VISUAL_STUDIO_SOLUTION,
+    private static final int[] FAMILY_SH = new int[]{
+            TYPE_PROPERTIES, TYPE_PYTHON, TYPE_SH, TYPE_RUBY, TYPE_PERL,
+            TYPE_TCL, TYPE_VISUAL_STUDIO_SOLUTION,
     };
-    private static final int[] FAMILY_BAT = new int[] {
-        TYPE_BAT,
+    private static final int[] FAMILY_BAT = new int[]{
+            TYPE_BAT,
     };
-    private static final int[] FAMILY_APT = new int[] {
-        TYPE_APT,
+    private static final int[] FAMILY_APT = new int[]{
+            TYPE_APT,
     };
-    private static final int[] FAMILY_VELOCITY = new int[] {
-        TYPE_VM,
+    private static final int[] FAMILY_VELOCITY = new int[]{
+            TYPE_VM,
     };
-    private static final int[] EXPECTS_HASH_PLING = new int[] {
-        TYPE_PYTHON, TYPE_SH, TYPE_RUBY, TYPE_PERL, TYPE_TCL
+    private static final int[] EXPECTS_HASH_PLING = new int[]{
+            TYPE_PYTHON, TYPE_SH, TYPE_RUBY, TYPE_PERL, TYPE_TCL
     };
-    private static final int[] EXPECTS_AT_ECHO = new int[] {
-        TYPE_BAT,
+    private static final int[] EXPECTS_AT_ECHO = new int[]{
+            TYPE_BAT,
     };
-    private static final int[] EXPECTS_PACKAGE = new int[] {
-        TYPE_JAVA,
+    private static final int[] EXPECTS_PACKAGE = new int[]{
+            TYPE_JAVA,
     };
-    private static final int[] EXPECTS_XML_DECL = new int[] {
-        TYPE_XML,
+    private static final int[] EXPECTS_XML_DECL = new int[]{
+            TYPE_XML,
     };
-    private static final int[] EXPECTS_PHP_PI = new int[] {
-        TYPE_PHP,
+    private static final int[] EXPECTS_PHP_PI = new int[]{
+            TYPE_PHP,
     };
-    private static final int[] EXPECTS_MSVSSF_HEADER = new int[] {
-        TYPE_VISUAL_STUDIO_SOLUTION,
+    private static final int[] EXPECTS_MSVSSF_HEADER = new int[]{
+            TYPE_VISUAL_STUDIO_SOLUTION,
     };
 
     private static final Map<String, Integer> EXT2TYPE = new HashMap<String, Integer>();
@@ -187,11 +188,10 @@ public abstract class AbstractLicenceApp
     }
 
     /**
-     * Append the default licence header to the supplied document.
+     * Append the default license header to the supplied document.
      *
      * @param document document to append to.
-     * @throws IOException
-     *           if there is a problem while reading or writing the file
+     * @throws IOException if there is a problem while reading or writing the file
      */
     public void append(File document) throws IOException {
         int type = getType(document);
@@ -210,8 +210,8 @@ public abstract class AbstractLicenceApp
         FileWriter writer = new FileWriter(newDocument);
         try {
             if (!attachLicense(writer, document,
-                               expectsHashPling, expectsAtEcho, expectsPackage,
-                               expectsXMLDecl, expectsPhpPI, expectsMSVSSF)) {
+                    expectsHashPling, expectsAtEcho, expectsPackage,
+                    expectsXMLDecl, expectsPhpPI, expectsMSVSSF)) {
                 // Java File without package, XML file without decl or PHP
                 // file without PI
                 // for Java just place the license at the front, for XML add
@@ -223,7 +223,7 @@ public abstract class AbstractLicenceApp
                         writer.write(LINE_SEP);
                     }
                     attachLicense(writer, document,
-                                  false, false, false, false, false, false);
+                            false, false, false, false, false, false);
                 }
             }
         } finally {
@@ -242,6 +242,7 @@ public abstract class AbstractLicenceApp
     /**
      * Write document's content to writer attaching the license using
      * the given flags as hints for where to put it.
+     *
      * @return whether the license has actually been written
      */
     private boolean attachLicense(Writer writer, File document,
@@ -251,7 +252,7 @@ public abstract class AbstractLicenceApp
                                   boolean expectsXMLDecl,
                                   boolean expectsPhpPI,
                                   boolean expectsMSVSSF)
-        throws IOException {
+            throws IOException {
         boolean written = false;
         try {
             FileInputStream fis = new FileInputStream(document);
@@ -260,13 +261,13 @@ public abstract class AbstractLicenceApp
                 br = new BufferedReader(new InputStreamReader(new BOMInputStream(fis)));
 
                 if (!expectsHashPling
-                    && !expectsAtEcho
-                    && !expectsPackage
-                    && !expectsXMLDecl
-                    && !expectsPhpPI
-                    && !expectsMSVSSF) {
+                        && !expectsAtEcho
+                        && !expectsPackage
+                        && !expectsXMLDecl
+                        && !expectsPhpPI
+                        && !expectsMSVSSF) {
                     written = true;
-                    writer.write(getLicenceHeader(document));
+                    writer.write(getLicenseHeader(document));
                     writer.write(LINE_SEP);
                 }
 
@@ -285,7 +286,7 @@ public abstract class AbstractLicenceApp
                             line = passThroughReadNext(writer, line, br);
                         }
                         if (line.startsWith("Microsoft Visual Studio Solution"
-                                            + " File")) {
+                                + " File")) {
                             line = passThroughReadNext(writer, line, br);
                         }
                         doFirstLine(document, writer, line, "# Visual ");
@@ -297,17 +298,17 @@ public abstract class AbstractLicenceApp
                     if (expectsPackage && line.startsWith("package ")) {
                         written = true;
                         writer.write(LINE_SEP);
-                        writer.write(getLicenceHeader(document));
+                        writer.write(getLicenseHeader(document));
                         writer.write(LINE_SEP);
                     } else if (expectsXMLDecl && line.startsWith("<?xml ")) {
                         written = true;
                         writer.write(LINE_SEP);
-                        writer.write(getLicenceHeader(document));
+                        writer.write(getLicenseHeader(document));
                         writer.write(LINE_SEP);
                     } else if (expectsPhpPI && line.startsWith("<?php")) {
                         written = true;
                         writer.write(LINE_SEP);
-                        writer.write(getLicenceHeader(document));
+                        writer.write(getLicenseHeader(document));
                         writer.write(LINE_SEP);
                     }
                     first = false;
@@ -327,13 +328,13 @@ public abstract class AbstractLicenceApp
     /**
      * Check first line for specified text and process.
      */
-    private void doFirstLine(File document, Writer writer, String line, String lookfor) throws IOException  {
+    private void doFirstLine(File document, Writer writer, String line, String lookfor) throws IOException {
         if (line.startsWith(lookfor)) {
             writer.write(line);
             writer.write(LINE_SEP);
-            writer.write(getLicenceHeader(document));
+            writer.write(getLicenseHeader(document));
         } else {
-            writer.write(getLicenceHeader(document));
+            writer.write(getLicenseHeader(document));
             writer.write(line);
             writer.write(LINE_SEP);
         }
@@ -371,13 +372,13 @@ public abstract class AbstractLicenceApp
     }
 
     /**
-     * @return Get the licence header of a document.
      * @param document document to extract from.
+     * @return Get the license header of a document.
      */
-    public abstract String getLicenceHeader(File document);
+    public abstract String getLicenseHeader(File document);
 
     /**
-     * Get the first line of the licence header formatted
+     * Get the first line of the license header formatted
      * for the given type of file.
      *
      * @param type the type of file, see the TYPE_* constants
@@ -394,7 +395,7 @@ public abstract class AbstractLicenceApp
 
 
     /**
-     * Get the last line of the licence header formatted
+     * Get the last line of the license header formatted
      * for the given type of file.
      *
      * @param type the type of file, see the TYPE_* constants
@@ -411,10 +412,10 @@ public abstract class AbstractLicenceApp
 
 
     /**
-     * Get a line of the licence header formatted
+     * Get a line of the license header formatted
      * for the given type of file.
      *
-     * @param type the type of file, see the TYPE_* constants
+     * @param type    the type of file, see the TYPE_* constants
      * @param content the content for this line
      * @return not null
      */
@@ -438,39 +439,51 @@ public abstract class AbstractLicenceApp
     private static boolean isFamilyC(int type) {
         return isIn(FAMILY_C, type);
     }
+
     private static boolean isFamilySGML(int type) {
         return isIn(FAMILY_SGML, type);
     }
+
     private static boolean isFamilySH(int type) {
         return isIn(FAMILY_SH, type);
     }
+
     private static boolean isFamilyAPT(int type) {
         return isIn(FAMILY_APT, type);
     }
+
     private static boolean isFamilyBAT(int type) {
         return isIn(FAMILY_BAT, type);
     }
+
     private static boolean isFamilyVelocity(int type) {
         return isIn(FAMILY_VELOCITY, type);
     }
+
     private static boolean expectsHashPling(int type) {
         return isIn(EXPECTS_HASH_PLING, type);
     }
+
     private static boolean expectsAtEcho(int type) {
         return isIn(EXPECTS_AT_ECHO, type);
     }
+
     private static boolean expectsPackage(int type) {
         return isIn(EXPECTS_PACKAGE, type);
     }
+
     private static boolean expectsXMLDecl(int type) {
         return isIn(EXPECTS_XML_DECL, type);
     }
+
     private static boolean expectsPhpPI(int type) {
         return isIn(EXPECTS_PHP_PI, type);
     }
+
     private static boolean expectsMSVisualStudioSolutionFileHeader(int type) {
         return isIn(EXPECTS_MSVSSF_HEADER, type);
     }
+
     private static boolean isIn(int[] arr, int key) {
         return Arrays.binarySearch(arr, key) >= 0;
     }
@@ -492,9 +505,9 @@ class BOMInputStream extends FilterInput
     private int fbLength, fbIndex, markFbIndex;
     private boolean markedAtStart;
     private static final int[][] BOMS = {
-        new int[] { 0xEF, 0xBB, 0xBF }, // UTF-8
-        new int[] { 0xFE, 0xFF }, // UTF-16BE
-        new int[] { 0xFF, 0xFE }, // UTF-16LE
+            new int[]{0xEF, 0xBB, 0xBF}, // UTF-8
+            new int[]{0xFE, 0xFF}, // UTF-16BE
+            new int[]{0xFF, 0xFE}, // UTF-16LE
     };
 
     BOMInputStream(InputStream s) {
@@ -521,7 +534,7 @@ class BOMInputStream extends FilterInput
         }
         int secondCount = in.read(buf, off, len);
         return (secondCount < 0)
-            ? (firstCount > 0 ? firstCount : -1) : firstCount + secondCount;
+                ? (firstCount > 0 ? firstCount : -1) : firstCount + secondCount;
     }
 
     @Override
@@ -556,6 +569,7 @@ class BOMInputStream extends FilterInput
             }
         }
     }
+
     @Override
     public synchronized void mark(int readlimit) {
         markFbIndex = fbIndex;

Modified: creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/annotation/ApacheV2LicenceAppender.java
URL: http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/annotation/ApacheV2LicenceAppender.java?rev=1681534&r1=1681533&r2=1681534&view=diff
==============================================================================
--- creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/annotation/ApacheV2LicenceAppender.java (original)
+++ creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/annotation/ApacheV2LicenceAppender.java Sun May 24 22:05:01 2015
@@ -22,79 +22,77 @@ import java.io.File;
 
 
 /**
- * Add an Apache Licence V2 licence header to a 
+ * Add an Apache License V2 license header to a
  * document. This appender does not check for the
- * existence of an existing licence header, it is assumed that either a second
- * licence header is intentional or that there is no licence header present
- * already. 
- * 
+ * existence of an existing license header, it is assumed that either a second
+ * license header is intentional or that there is no license header present
+ * already.
  */
 public class ApacheV2LicenceAppender extends AbstractLicenceAppender {
 
-  private String copyright;
+    private String copyright;
 
-  /**
-   * Create a licence appender with the standard ASF licence header.
-   */
-  public ApacheV2LicenceAppender() {
-    super();
-  }
-
-  /**
-   * Create a licence appender with the given copyright line. This should be of
-   * the form &quot;Copyright 2008 Foo&quot;
-   * 
-   * @param copyright copyright line. 
-   */
-  public ApacheV2LicenceAppender(String copyright) {
-    super();
-    this.copyright = copyright;
-  }
-
-  @Override
-  public String getLicenceHeader(File document) {
-    int type = getType(document);
-    StringBuilder sb = new StringBuilder();
-    if (copyright == null) {
-      sb.append(getFirstLine(type));
-      sb.append(getLine(type, "Licensed to the Apache Software Foundation (ASF) under one"));
-      sb.append(getLine(type, "or more contributor license agreements.  See the NOTICE file"));
-      sb.append(getLine(type, "distributed with this work for additional information"));
-      sb.append(getLine(type, "regarding copyright ownership.  The ASF licenses this file"));
-      sb.append(getLine(type, "to you under the Apache License, Version 2.0 (the"));
-      sb.append(getLine(type, "\"License\"); you may not use this file except in compliance"));
-      sb.append(getLine(type, "with the License.  You may obtain a copy of the License at"));
-      sb.append(getLine(type, ""));
-      sb.append(getLine(type, "  http://www.apache.org/licenses/LICENSE-2.0"));
-      sb.append(getLine(type, ""));
-      sb.append(getLine(type, "Unless required by applicable law or agreed to in writing,"));
-      sb.append(getLine(type, "software distributed under the License is distributed on an"));
-      sb.append(getLine(type, "\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY"));
-      sb.append(getLine(type, "KIND, either express or implied.  See the License for the"));
-      sb.append(getLine(type, "specific language governing permissions and limitations"));
-      sb.append(getLine(type, "under the License."));
-      sb.append(getLastLine(type));
-    } else {
-      sb.append(getFirstLine(type));
-      sb.append(getLine(type, copyright));
-      sb.append(getLine(type, ""));
-      sb.append(getLine(type, "Licensed under the Apache License, Version 2.0 (the \"License\");"));
-      sb.append(getLine(type, "you may not use this file except in compliance with the License."));
-      sb.append(getLine(type, "You may obtain a copy of the License at"));
-      sb.append(getLine(type, ""));
-      sb.append(getLine(type, "  http://www.apache.org/licenses/LICENSE-2.0"));
-      sb.append(getLine(type, ""));
-      sb.append(getLine(type, "Unless required by applicable law or agreed to in writing,"));
-      sb.append(getLine(type, "software distributed under the License is distributed on an"));
-      sb.append(getLine(type, "\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY"));
-      sb.append(getLine(type, "KIND, either express or implied.  See the License for the"));
-      sb.append(getLine(type, "specific language governing permissions and limitations"));
-      sb.append(getLine(type, "under the License."));
-      sb.append(getLastLine(type));
+    /**
+     * Create a license appender with the standard ASF license header.
+     */
+    public ApacheV2LicenceAppender() {
+        super();
     }
-    return sb.toString();
-  }
-  
-  
+
+    /**
+     * Create a license appender with the given copyright line. This should be of
+     * the form &quot;Copyright 2008 Foo&quot;
+     *
+     * @param copyright copyright line.
+     */
+    public ApacheV2LicenceAppender(String copyright) {
+        super();
+        this.copyright = copyright;
+    }
+
+    @Override
+    public String getLicenseHeader(File document) {
+        int type = getType(document);
+        StringBuilder sb = new StringBuilder();
+        if (copyright == null) {
+            sb.append(getFirstLine(type));
+            sb.append(getLine(type, "Licensed to the Apache Software Foundation (ASF) under one"));
+            sb.append(getLine(type, "or more contributor license agreements.  See the NOTICE file"));
+            sb.append(getLine(type, "distributed with this work for additional information"));
+            sb.append(getLine(type, "regarding copyright ownership.  The ASF licenses this file"));
+            sb.append(getLine(type, "to you under the Apache License, Version 2.0 (the"));
+            sb.append(getLine(type, "\"License\"); you may not use this file except in compliance"));
+            sb.append(getLine(type, "with the License.  You may obtain a copy of the License at"));
+            sb.append(getLine(type, ""));
+            sb.append(getLine(type, "  http://www.apache.org/licenses/LICENSE-2.0"));
+            sb.append(getLine(type, ""));
+            sb.append(getLine(type, "Unless required by applicable law or agreed to in writing,"));
+            sb.append(getLine(type, "software distributed under the License is distributed on an"));
+            sb.append(getLine(type, "\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY"));
+            sb.append(getLine(type, "KIND, either express or implied.  See the License for the"));
+            sb.append(getLine(type, "specific language governing permissions and limitations"));
+            sb.append(getLine(type, "under the License."));
+            sb.append(getLastLine(type));
+        } else {
+            sb.append(getFirstLine(type));
+            sb.append(getLine(type, copyright));
+            sb.append(getLine(type, ""));
+            sb.append(getLine(type, "Licensed under the Apache License, Version 2.0 (the \"License\");"));
+            sb.append(getLine(type, "you may not use this file except in compliance with the License."));
+            sb.append(getLine(type, "You may obtain a copy of the License at"));
+            sb.append(getLine(type, ""));
+            sb.append(getLine(type, "  http://www.apache.org/licenses/LICENSE-2.0"));
+            sb.append(getLine(type, ""));
+            sb.append(getLine(type, "Unless required by applicable law or agreed to in writing,"));
+            sb.append(getLine(type, "software distributed under the License is distributed on an"));
+            sb.append(getLine(type, "\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY"));
+            sb.append(getLine(type, "KIND, either express or implied.  See the License for the"));
+            sb.append(getLine(type, "specific language governing permissions and limitations"));
+            sb.append(getLine(type, "under the License."));
+            sb.append(getLastLine(type));
+        }
+        return sb.toString();
+    }
+
 
 }

Modified: creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/analysis/license/CDDL1LicenseTest.java
URL: http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/analysis/license/CDDL1LicenseTest.java?rev=1681534&r1=1681533&r2=1681534&view=diff
==============================================================================
--- creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/analysis/license/CDDL1LicenseTest.java (original)
+++ creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/analysis/license/CDDL1LicenseTest.java Sun May 24 22:05:01 2015
@@ -18,12 +18,6 @@
  */
 package org.apache.rat.analysis.license;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.util.HashMap;
-import java.util.Map;
 import org.apache.rat.analysis.IHeaderMatcher;
 import org.apache.rat.api.Document;
 import org.apache.rat.document.MockLocation;
@@ -31,17 +25,24 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 public class CDDL1LicenseTest {
 
     private static final String LICENSE_LINE =
             " DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n\n"
-            + "Copyright 2011-2013 Tirasa. All rights reserved.\n\n"
-            + "The contents of this file are subject to the terms of the Common Development\n"
-            + "and Distribution License(\"CDDL\") (the \"License\"). You may not use this file\n"
-            + "except in compliance with the License.\n\n"
-            + "You can obtain a copy of the License at https://oss.oracle.com/licenses/CDDL\n"
-            + "See the License for the specific language governing permissions and limitations\n"
-            + "under the License.";
+                    + "Copyright 2011-2013 Tirasa. All rights reserved.\n\n"
+                    + "The contents of this file are subject to the terms of the Common Development\n"
+                    + "and Distribution License(\"CDDL\") (the \"License\"). You may not use this file\n"
+                    + "except in compliance with the License.\n\n"
+                    + "You can obtain a copy of the License at https://oss.oracle.com/licenses/CDDL\n"
+                    + "See the License for the specific language governing permissions and limitations\n"
+                    + "under the License.";
 
     /**
      * To ease testing provide a map with a given license version and the string to test for.
@@ -51,7 +52,7 @@ public class CDDL1LicenseTest {
     private Document subject;
 
     @BeforeClass
-    public static void initLicencesUnderTest() {
+    public static void initLicensesUnderTest() {
         licenseStringMap = new HashMap<IHeaderMatcher, String>();
         licenseStringMap.put(new CDDL1License(), LICENSE_LINE);
         assertEquals(1, licenseStringMap.entrySet().size());
@@ -64,24 +65,24 @@ public class CDDL1LicenseTest {
 
     @Test
     public void testNegativeMatches() throws Exception {
-        for (Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap.entrySet()) {
-            assertFalse(licenceUnderTest.getKey().match(subject, "'Behold, Telemachus! (nor fear the sight,)"));
+        for (Map.Entry<IHeaderMatcher, String> licenseUnderTest : licenseStringMap.entrySet()) {
+            assertFalse(licenseUnderTest.getKey().match(subject, "'Behold, Telemachus! (nor fear the sight,)"));
         }
     }
 
     @Test
     public void testPositiveMatchInDocument() throws Exception {
-        for (Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap.entrySet()) {
-            assertTrue(licenceUnderTest.getKey().match(subject, "\t" + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, "     " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " * " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " // " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " /* " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " /** " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, "    " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " ## " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " ## " + licenceUnderTest.getValue() + " ##"));
+        for (Map.Entry<IHeaderMatcher, String> licenseUnderTest : licenseStringMap.entrySet()) {
+            assertTrue(licenseUnderTest.getKey().match(subject, "\t" + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, "     " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " * " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " // " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " /* " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " /** " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, "    " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " ## " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " ## " + licenseUnderTest.getValue() + " ##"));
         }
     }
 }

Modified: creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/analysis/license/GPL123LicenseTest.java
URL: http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/analysis/license/GPL123LicenseTest.java?rev=1681534&r1=1681533&r2=1681534&view=diff
==============================================================================
--- creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/analysis/license/GPL123LicenseTest.java (original)
+++ creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/analysis/license/GPL123LicenseTest.java Sun May 24 22:05:01 2015
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.analysis.license;
 
 import org.apache.rat.analysis.IHeaderMatcher;
@@ -48,7 +48,7 @@ public class GPL123LicenseTest {
      * If you replace this with BeforeClass and make this method static the build fails at line 67.
      */
     @Before
-    public void initLicencesUnderTest() {
+    public void initLicensesUnderTest() {
         licenseStringMap = new HashMap<IHeaderMatcher, String>();
         licenseStringMap.put(new GPL1License(), GPL1License.FIRST_LICENSE_LINE);
         licenseStringMap.put(new GPL2License(), GPL2License.FIRST_LICENSE_LINE);
@@ -63,24 +63,24 @@ public class GPL123LicenseTest {
 
     @Test
     public void testNegativeMatches() throws Exception {
-        for(Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap.entrySet()) {
-            assertFalse(licenceUnderTest.getKey().match(subject, "'Behold, Telemachus! (nor fear the sight,)"));
+        for (Map.Entry<IHeaderMatcher, String> licenseUnderTest : licenseStringMap.entrySet()) {
+            assertFalse(licenseUnderTest.getKey().match(subject, "'Behold, Telemachus! (nor fear the sight,)"));
         }
     }
 
     @Test
     public void testPositiveMatchInDocument() throws Exception {
-        for(Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap.entrySet()) {
-            assertTrue(licenceUnderTest.getKey().match(subject, "\t" + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, "     " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " * " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " // " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " /* " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " /** " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, "    " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " ## " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " ## " + licenceUnderTest.getValue() + " ##"));
+        for (Map.Entry<IHeaderMatcher, String> licenseUnderTest : licenseStringMap.entrySet()) {
+            assertTrue(licenseUnderTest.getKey().match(subject, "\t" + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, "     " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " * " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " // " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " /* " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " /** " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, "    " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " ## " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " ## " + licenseUnderTest.getValue() + " ##"));
         }
     }
 

Modified: creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/analysis/license/MITLicenseTest.java
URL: http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/analysis/license/MITLicenseTest.java?rev=1681534&r1=1681533&r2=1681534&view=diff
==============================================================================
--- creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/analysis/license/MITLicenseTest.java (original)
+++ creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/analysis/license/MITLicenseTest.java Sun May 24 22:05:01 2015
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.analysis.license;
 
 import org.apache.rat.analysis.IHeaderMatcher;
@@ -43,12 +43,12 @@ public class MITLicenseTest {
      * If you replace this with BeforeClass and make this method static the build fails at line 71.
      */
     @Before
-    public void initLicencesUnderTest() {
+    public void initLicensesUnderTest() {
         licenseStringMap = new HashMap<IHeaderMatcher, String>();
         licenseStringMap.put(new MITLicense(),
-                             MITLicense.FIRST_LICENSE_LINE
-                             + "\n" + MITLicense.MIDDLE_LICENSE_LINE
-                             + "\r\n * " + MITLicense.AS_IS_LICENSE_LINE);
+                MITLicense.FIRST_LICENSE_LINE
+                        + "\n" + MITLicense.MIDDLE_LICENSE_LINE
+                        + "\r\n * " + MITLicense.AS_IS_LICENSE_LINE);
         assertEquals(1, licenseStringMap.entrySet().size());
     }
 
@@ -60,24 +60,24 @@ public class MITLicenseTest {
 
     @Test
     public void testNegativeMatches() throws Exception {
-        for(Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap.entrySet()) {
-            assertFalse(licenceUnderTest.getKey().match(subject, "'Behold, Telemachus! (nor fear the sight,)"));
+        for (Map.Entry<IHeaderMatcher, String> licenseUnderTest : licenseStringMap.entrySet()) {
+            assertFalse(licenseUnderTest.getKey().match(subject, "'Behold, Telemachus! (nor fear the sight,)"));
         }
     }
 
     @Test
     public void testPositiveMatchInDocument() throws Exception {
-        for(Map.Entry<IHeaderMatcher, String> licenceUnderTest : licenseStringMap.entrySet()) {
-            assertTrue(licenceUnderTest.getKey().match(subject, "\t" + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, "     " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " * " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " // " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " /* " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " /** " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, "    " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " ## " + licenceUnderTest.getValue()));
-            assertTrue(licenceUnderTest.getKey().match(subject, " ## " + licenceUnderTest.getValue() + " ##"));
+        for (Map.Entry<IHeaderMatcher, String> licenseUnderTest : licenseStringMap.entrySet()) {
+            assertTrue(licenseUnderTest.getKey().match(subject, "\t" + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, "     " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " * " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " // " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " /* " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " /** " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, "    " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " ## " + licenseUnderTest.getValue()));
+            assertTrue(licenseUnderTest.getKey().match(subject, " ## " + licenseUnderTest.getValue() + " ##"));
         }
     }