creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Gumbrecht (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TENTACLES-1) LicenseFilter should check for directories
Date Mon, 21 Jul 2014 23:56:39 GMT

    [ https://issues.apache.org/jira/browse/TENTACLES-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14069539#comment-14069539
] 

Andy Gumbrecht commented on TENTACLES-1:
----------------------------------------

Index: src/main/java/org/apache/creadur/tentacles/filter/LicenseFilter.java
===================================================================
--- src/main/java/org/apache/creadur/tentacles/filter/LicenseFilter.java	(revision 1609935)
+++ src/main/java/org/apache/creadur/tentacles/filter/LicenseFilter.java	(working copy)
@@ -24,15 +24,14 @@
 final class LicenseFilter implements FileFilter {
     @Override
     public boolean accept(final File pathname) {
-        final String name = pathname.getName().toLowerCase();
 
-        if (name.equals("license")) {
-            return true;
+        if (pathname.isDirectory()) {
+            return false;
         }
-        if (name.equals("license.txt")) {
-            return true;
-        }
 
-        return false;
+        final String name = pathname.getName().toLowerCase();
+
+        return name.equals("license") || name.equals("license.txt");
+
     }
 }
\ No newline at end of file


> LicenseFilter should check for directories
> ------------------------------------------
>
>                 Key: TENTACLES-1
>                 URL: https://issues.apache.org/jira/browse/TENTACLES-1
>             Project: Apache Tentacles
>          Issue Type: Bug
>            Reporter: Andy Gumbrecht
>            Assignee: Robert Burrell Donkin
>
> LicenseFilter should check for directories



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message