From: aclement Date: Wed, 9 Apr 2008 23:45:34 +0000 (+0000) Subject: 160868: dont check paths more than once X-Git-Tag: V1_6_0rc1~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6fbf0de6132bdb29d1174e7b552fbba2b03f96a6;p=aspectj.git 160868: dont check paths more than once --- diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java index 4fd950b43..de0ee5a90 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java @@ -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); + } } } }