creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r1549112 - /creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/NoteGuesser.java
Date Sun, 08 Dec 2013 19:02:48 GMT
Author: rdonkin
Date: Sun Dec  8 19:02:47 2013
New Revision: 1549112

URL: http://svn.apache.org/r1549112
Log:
Format Code.

Modified:
    creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/NoteGuesser.java

Modified: creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/NoteGuesser.java
URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/NoteGuesser.java?rev=1549112&r1=1549111&r2=1549112&view=diff
==============================================================================
--- creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/NoteGuesser.java
(original)
+++ creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/NoteGuesser.java
Sun Dec  8 19:02:47 2013
@@ -25,58 +25,58 @@ import org.apache.rat.api.Document;
 
 public class NoteGuesser {
 
-    private static final String[] NOTE_FILE_NAMES = { "NOTICE", "LICENSE",
-            "LICENSE.TXT", "NOTICE.TXT", "INSTALL", "INSTALL.TXT", "README",
-            "README.TXT", "NEWS", "NEWS.TXT", "AUTHOR", "AUTHOR.TXT",
-            "AUTHORS", "AUTHORS.txt", "CHANGELOG", "CHANGELOG.TXT",
-            "DISCLAIMER", "DISCLAIMER.TXT", "KEYS", "KEYS.TXT",
-            "RELEASE-NOTES", "RELEASE-NOTES.TXT", "RELEASE_NOTES",
-            "RELEASE_NOTES.TXT", "UPGRADE", "UPGRADE.TXT", "STATUS",
-            "STATUS.TXT", "THIRD_PARTY_NOTICES", "THIRD_PARTY_NOTICES.TXT",
-            "COPYRIGHT", "COPYRIGHT.TXT", "BUILDING", "BUILDING.TXT", "BUILD",
-            "BUILT.TXT", };
-    private static final String[] NOTE_FILE_EXTENSIONS = { "LICENSE",
-            "LICENSE.TXT", "NOTICE", "NOTICE.TXT", };
-
-    private final String[] noteFileNames;
-    private final String[] noteFileExtensions;
-
-    public NoteGuesser() {
-        this(NOTE_FILE_NAMES, NOTE_FILE_EXTENSIONS);
-    }
-
-    public NoteGuesser(final String[] noteFileNames,
-            final String[] noteFileExtensions) {
-        super();
-        this.noteFileNames = noteFileNames;
-        this.noteFileExtensions = noteFileExtensions;
-    }
-
-    /**
-     * Is a file by that name a note file?
-     */
-    private final boolean isNote(final String name) {
-        if (name == null) {
-            return false;
-        }
-
-        final List<String> l = Arrays.asList(this.noteFileNames);
-        final String normalisedName = GuessUtils.normalise(name);
-
-        if (l.contains(name) || l.contains(normalisedName)) {
-            return true;
-        }
-
-        for (final String element : this.noteFileExtensions) {
-            if (normalisedName.endsWith("." + element)) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    public final boolean matches(final Document document) {
-        return isNote(document.getName());
-    }
+	private static final String[] NOTE_FILE_NAMES = { "NOTICE", "LICENSE",
+			"LICENSE.TXT", "NOTICE.TXT", "INSTALL", "INSTALL.TXT", "README",
+			"README.TXT", "NEWS", "NEWS.TXT", "AUTHOR", "AUTHOR.TXT",
+			"AUTHORS", "AUTHORS.txt", "CHANGELOG", "CHANGELOG.TXT",
+			"DISCLAIMER", "DISCLAIMER.TXT", "KEYS", "KEYS.TXT",
+			"RELEASE-NOTES", "RELEASE-NOTES.TXT", "RELEASE_NOTES",
+			"RELEASE_NOTES.TXT", "UPGRADE", "UPGRADE.TXT", "STATUS",
+			"STATUS.TXT", "THIRD_PARTY_NOTICES", "THIRD_PARTY_NOTICES.TXT",
+			"COPYRIGHT", "COPYRIGHT.TXT", "BUILDING", "BUILDING.TXT", "BUILD",
+			"BUILT.TXT", };
+	private static final String[] NOTE_FILE_EXTENSIONS = { "LICENSE",
+			"LICENSE.TXT", "NOTICE", "NOTICE.TXT", };
+
+	private final String[] noteFileNames;
+	private final String[] noteFileExtensions;
+
+	public NoteGuesser() {
+		this(NOTE_FILE_NAMES, NOTE_FILE_EXTENSIONS);
+	}
+
+	public NoteGuesser(final String[] noteFileNames,
+			final String[] noteFileExtensions) {
+		super();
+		this.noteFileNames = noteFileNames;
+		this.noteFileExtensions = noteFileExtensions;
+	}
+
+	/**
+	 * Is a file by that name a note file?
+	 */
+	private final boolean isNote(final String name) {
+		if (name == null) {
+			return false;
+		}
+
+		final List<String> l = Arrays.asList(this.noteFileNames);
+		final String normalisedName = GuessUtils.normalise(name);
+
+		if (l.contains(name) || l.contains(normalisedName)) {
+			return true;
+		}
+
+		for (final String element : this.noteFileExtensions) {
+			if (normalisedName.endsWith("." + element)) {
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	public final boolean matches(final Document document) {
+		return isNote(document.getName());
+	}
 }



Mime
View raw message