Index: SelectorUtils.java
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java,v
retrieving revision 1.3
diff -u -r1.3 SelectorUtils.java
--- SelectorUtils.java	25 Jul 2002 15:21:23 -0000	1.3
+++ SelectorUtils.java	29 Jul 2002 13:49:09 -0000
@@ -227,6 +227,7 @@
             }
             if (!match(patDir,(String)strDirs.elementAt(strIdxStart),
                     isCaseSensitive)) {
+                patDirs = null; strDirs = null;
                 return false;
             }
             patIdxStart++;
@@ -236,6 +237,7 @@
             // String is exhausted
             for (int i = patIdxStart; i <= patIdxEnd; i++) {
                 if (!patDirs.elementAt(i).equals("**")) {
+                    patDirs = null; strDirs = null;
                     return false;
                 }
             }
@@ -243,6 +245,7 @@
         } else {
             if (patIdxStart > patIdxEnd) {
                 // String not exhausted, but pattern is. Failure.
+                patDirs = null; strDirs = null;
                 return false;
             }
         }
@@ -255,6 +258,7 @@
             }
             if (!match(patDir,(String)strDirs.elementAt(strIdxEnd),
                     isCaseSensitive)) {
+                patDirs = null; strDirs = null;
                 return false;
             }
             patIdxEnd--;
@@ -264,6 +268,7 @@
             // String is exhausted
             for (int i = patIdxStart; i <= patIdxEnd; i++) {
                 if (!patDirs.elementAt(i).equals("**")) {
+                    patDirs = null; strDirs = null;
                     return false;
                 }
             }
@@ -303,6 +308,7 @@
             }
 
             if (foundIdx == -1) {
+                patDirs = null; strDirs = null;
                 return false;
             }
 
@@ -312,6 +318,7 @@
 
         for (int i = patIdxStart; i <= patIdxEnd; i++) {
             if (!patDirs.elementAt(i).equals("**")) {
+                patDirs = null; strDirs = null;
                 return false;
             }
         }

