mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 04:16:19 +00:00
lombok.disableConfig would cause NPEs here and there because we returned null instead of an empty list for listy keys. Whoops. Spotted and fixed by github user egde, thanks!
This commit is contained in:
1 parent
093ea84086
commit
071fa6835a
2 files changed
+5
-2
No files matched your search
@@ -21,6 +21,8 @@
|
||||
*/
|
||||
package lombok.core;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import lombok.core.configuration.BubblingConfigurationResolver;
|
||||
import lombok.core.configuration.ConfigurationKey;
|
||||
import lombok.core.configuration.ConfigurationProblemReporter;
|
||||
@@ -30,7 +32,8 @@ import lombok.core.configuration.FileSystemSourceCache;
|
||||
|
||||
public class LombokConfiguration {
|
||||
private static final ConfigurationResolver NULL_RESOLVER = new ConfigurationResolver() {
|
||||
@Override public <T> T resolve(ConfigurationKey<T> key) {
|
||||
@SuppressWarnings("unchecked") @Override public <T> T resolve(ConfigurationKey<T> key) {
|
||||
if (key.getType().isList()) return (T) Collections.emptyList();
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -186,7 +186,7 @@ public final class ConfigurationDataType {
|
||||
this.parser = parser;
|
||||
}
|
||||
|
||||
boolean isList() {
|
||||
public boolean isList() {
|
||||
return isList;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user