From 6fbf0de6132bdb29d1174e7b552fbba2b03f96a6 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 9 Apr 2008 23:45:34 +0000 Subject: [PATCH] 160868: dont check paths more than once --- .../aspectj/ajdt/internal/core/builder/AjState.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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); + } } } } -- 2.39.5