Fix NPE in ConfigurateConfigAdapter#getStringList (#2399)

This commit is contained in:
Luck 2020-06-21 10:18:27 +01:00
parent f893b1c632
commit bfaa543ecd
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -88,7 +88,7 @@ public abstract class ConfigurateConfigAdapter implements ConfigurationAdapter {
@Override
public List<String> getStringList(String path, List<String> def) {
ConfigurationNode node = resolvePath(path);
if (node.isVirtual()) {
if (node.isVirtual() || !node.hasListChildren()) {
return def;
}
@ -98,7 +98,7 @@ public abstract class ConfigurateConfigAdapter implements ConfigurationAdapter {
@Override
public List<String> getKeys(String path, List<String> def) {
ConfigurationNode node = resolvePath(path);
if (node.isVirtual()) {
if (node.isVirtual() || !node.hasMapChildren()) {
return def;
}