]> source.dussan.org Git - aspectj.git/commitdiff
160868: dont check paths more than once
authoraclement <aclement>
Wed, 9 Apr 2008 23:45:34 +0000 (23:45 +0000)
committeraclement <aclement>
Wed, 9 Apr 2008 23:45:34 +0000 (23:45 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java

index 4fd950b43a14020ee31538fe12ed8ea74b76d37e..de0ee5a9042b6c9432e897f96c1efea50f1f3d9f 100644 (file)
@@ -701,6 +701,7 @@ public class AjState {
                if (oldPath.size() != newPath.size()) {
                        return true;
                }
+               Set analysedPaths = new HashSet();
                for (int i = 0; i < oldPath.size(); i++) {
                        if (!oldPath.get(i).equals(newPath.get(i))) {
                                return true;
@@ -725,10 +726,13 @@ public class AjState {
                                        }
                                }
                                if (!foundMatch) {
-                                   int classFileChanges = classFileChangedInDirSinceLastBuildRequiringFullBuild(f);
-                    if (classFileChanges == CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD)
-                        return true;
-                    // if (b && stateListener!=null) stateListener.detectedClassChangeInThisDir(f);
+                                   if (!analysedPaths.contains(f.getAbsolutePath())) { // Do not check paths more than once
+                        analysedPaths.add(f.getAbsolutePath());
+                        int classFileChanges = classFileChangedInDirSinceLastBuildRequiringFullBuild(f);
+                        if (classFileChanges == CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD)
+                            return true;
+                        // if (b && stateListener!=null) stateListener.detectedClassChangeInThisDir(f);
+                    }
                                }
                        }
                }