ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r537859 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ResourceContains.java
Date Mon, 14 May 2007 14:44:51 GMT
Author: mbenson
Date: Mon May 14 07:44:50 2007
New Revision: 537859

URL: http://svn.apache.org/viewvc?view=rev&rev=537859
Log:
ws

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ResourceContains.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ResourceContains.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ResourceContains.java?view=diff&rev=537859&r1=537858&r2=537859
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ResourceContains.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ResourceContains.java
Mon May 14 07:44:50 2007
@@ -37,7 +37,7 @@
     private String substring;
     private Resource resource;
     private boolean casesensitive = true;
-    
+
     /**
      * Sets the resource to search
      * @param r
@@ -61,7 +61,7 @@
     public void setCasesensitive(boolean casesensitive) {
         this.casesensitive = casesensitive;
     }
-    
+
     /**
      * Evaluates
      * Returns true if the substring is contained in the resource
@@ -71,21 +71,21 @@
             throw new BuildException("both resource and substring are required "
                                      + "in <resourcecontains>");
         }
-        
+
         if (resource.getSize() == 0) {
             return false;
         }
-        
+
         BufferedReader reader = null;
         try {
             reader = new BufferedReader(new InputStreamReader(resource.getInputStream()));
             String contents = FileUtils.readFully(reader);
-            if(casesensitive) {
-                if(contents.indexOf(substring) > -1) {
+            if (casesensitive) {
+                if (contents.indexOf(substring) > -1) {
                     return true;
                 }
             } else {
-                if(contents.toLowerCase().indexOf(substring) > -1) {
+                if (contents.toLowerCase().indexOf(substring) > -1) {
                     return true;
                 }
             }
@@ -96,4 +96,4 @@
             FileUtils.close(reader);
         }
     }
-}
\ No newline at end of file
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message