creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r1548273 - in /creadur/rat/branches/gsoc/apache-rat-core/src: main/java/org/apache/rat/analysis/ main/java/org/apache/rat/document/impl/guesser/ test/java/org/apache/rat/document/impl/guesser/
Date Thu, 05 Dec 2013 20:27:38 GMT
Author: rdonkin
Date: Thu Dec  5 20:27:37 2013
New Revision: 1548273

URL: http://svn.apache.org/r1548273
Log:
Inline evocations of static method.

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

Modified: creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/analysis/DefaultAnalyser.java
URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/analysis/DefaultAnalyser.java?rev=1548273&r1=1548272&r2=1548273&view=diff
==============================================================================
--- creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/analysis/DefaultAnalyser.java
(original)
+++ creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/analysis/DefaultAnalyser.java
Thu Dec  5 20:27:37 2013
@@ -39,7 +39,7 @@ final class DefaultAnalyser implements I
     public void analyse(final Document subject)
             throws RatDocumentAnalysisException {
         final MetaData.Datum documentCategory;
-        if (NoteGuesser.isNote(subject)) {
+        if (new NoteGuesser().matches(subject)) {
             documentCategory = MetaData.RAT_DOCUMENT_CATEGORY_DATUM_NOTICE;
         } else {
             if (this.archiveGuesser.matches(subject)) {

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=1548273&r1=1548272&r2=1548273&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
Thu Dec  5 20:27:37 2013
@@ -38,11 +38,7 @@ public class NoteGuesser {
     private static final String[] NOTE_FILE_EXTENSIONS = { "LICENSE",
             "LICENSE.TXT", "NOTICE", "NOTICE.TXT", };
 
-    public static final boolean isNote(final Document document) {
-        return new NoteGuesser().matches(document);
-    }
-
-    private NoteGuesser() {
+    public NoteGuesser() {
     }
 
     /**

Modified: creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/NoteGuesserTest.java
URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/NoteGuesserTest.java?rev=1548273&r1=1548272&r2=1548273&view=diff
==============================================================================
--- creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/NoteGuesserTest.java
(original)
+++ creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/NoteGuesserTest.java
Thu Dec  5 20:27:37 2013
@@ -48,6 +48,6 @@ public class NoteGuesserTest {
     }
 
     private void assertThatGuesserMatches(final String name) {
-        assertTrue(NoteGuesser.isNote(new MockDocument(name)));
+        assertTrue(new NoteGuesser().matches(new MockDocument(name)));
     }
 }



Mime
View raw message