Re-applied the changes from the legacy FileInfoCache

Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/27631936
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/27631936
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/27631936

Branch: refs/heads/develop
Commit: 2763193677872cd1cd789e109fc087826e09c22c
Parents: b148d5b
Author: Frédéric THOMAS <webdoubl...@gmail.com>
Authored: Wed Jun 10 12:49:48 2015 +0100
Committer: Frédéric THOMAS <webdoubl...@gmail.com>
Committed: Sat Jun 13 17:08:46 2015 +0100

----------------------------------------------------------------------
 .../flex/tools/debugger/cli/FileInfoCache.java    | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/27631936/debugger/src/flex/tools/debugger/cli/FileInfoCache.java
----------------------------------------------------------------------
diff --git a/debugger/src/flex/tools/debugger/cli/FileInfoCache.java 
b/debugger/src/flex/tools/debugger/cli/FileInfoCache.java
index cff9dab..e66b89a 100644
--- a/debugger/src/flex/tools/debugger/cli/FileInfoCache.java
+++ b/debugger/src/flex/tools/debugger/cli/FileInfoCache.java
@@ -546,11 +546,11 @@ public class FileInfoCache implements 
Comparator<SourceFile>
                                exactHitAt = i;
                                break;
                        }
-                       else if (doStartsWith && name.startsWith(match) && 
!isDuplicated(fileList, sourceFile))
+            else if (doStartsWith && name.startsWith(match))
                                fileList.add(sourceFile);
-                       else if (doEndsWith && name.endsWith(match) && 
!isDuplicated(fileList, sourceFile))
+                       else if (doEndsWith && name.endsWith(match))
                 fileList.add(sourceFile);
-                       else if (doIndexOf && name.contains(match) && 
!isDuplicated(fileList, sourceFile))
+                       else if (doIndexOf && name.contains(match))
                                fileList.add(sourceFile);
         }
 
@@ -565,17 +565,5 @@ public class FileInfoCache implements 
Comparator<SourceFile>
                Arrays.sort(fileArray, this);
         return fileArray;
     }
-    
-
-    private boolean isDuplicated(ArrayList<SourceFile> fileList, SourceFile 
sourceFile) {
-        boolean found = false;
-        for (SourceFile next : fileList) {
-            if (next.getFullPath().equals(sourceFile.getFullPath())) {
-                found = true;
-                break;
-            }
-        }
-        return found;
-    }
 
 }

Reply via email to