aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok')
-rw-r--r--src/core/lombok/core/configuration/BubblingConfigurationResolver.java4
-rw-r--r--src/core/lombok/core/configuration/FileSystemSourceCache.java9
2 files changed, 9 insertions, 4 deletions
diff --git a/src/core/lombok/core/configuration/BubblingConfigurationResolver.java b/src/core/lombok/core/configuration/BubblingConfigurationResolver.java
index 2e7a76dc..3bcc331c 100644
--- a/src/core/lombok/core/configuration/BubblingConfigurationResolver.java
+++ b/src/core/lombok/core/configuration/BubblingConfigurationResolver.java
@@ -30,8 +30,6 @@ import lombok.core.configuration.ConfigurationSource.Result;
public class BubblingConfigurationResolver implements ConfigurationResolver {
- private static final ConfigurationKey<Boolean> STOP_BUBBLING = new ConfigurationKey<Boolean>("stop-bubbling") {};
-
private final Iterable<ConfigurationSource> sources;
public BubblingConfigurationResolver(Iterable<ConfigurationSource> sources) {
@@ -59,8 +57,6 @@ public class BubblingConfigurationResolver implements ConfigurationResolver {
}
return (T) result.getValue();
}
- Result stop = source.resolve(STOP_BUBBLING);
- if (stop != null && Boolean.TRUE.equals(stop.getValue())) break;
}
if (!isList) {
return null;
diff --git a/src/core/lombok/core/configuration/FileSystemSourceCache.java b/src/core/lombok/core/configuration/FileSystemSourceCache.java
index 3c51fbff..61e060ed 100644
--- a/src/core/lombok/core/configuration/FileSystemSourceCache.java
+++ b/src/core/lombok/core/configuration/FileSystemSourceCache.java
@@ -32,6 +32,9 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;
+import lombok.ConfigurationKeys;
+import lombok.core.configuration.ConfigurationSource.Result;
+
public class FileSystemSourceCache {
private static String LOMBOK_CONFIG_FILENAME = "lombok.config";
@@ -49,10 +52,12 @@ public class FileSystemSourceCache {
return new Iterator<ConfigurationSource>() {
File currentDirectory = directory;
ConfigurationSource next;
+ boolean stopBubbling = false;
@Override
public boolean hasNext() {
if (next != null) return true;
+ if (stopBubbling) return false;
next = findNext();
return next != null;
}
@@ -70,6 +75,10 @@ public class FileSystemSourceCache {
next = getSourceForDirectory(currentDirectory, reporterFactory);
currentDirectory = currentDirectory.getParentFile();
}
+ if (next != null) {
+ Result stop = next.resolve(ConfigurationKeys.STOP_BUBBLING);
+ stopBubbling = (stop != null && Boolean.TRUE.equals(stop.getValue()));
+ }
return next;
}