configmanager: Whoops forgot to add this

This commit is contained in:
Owain van Brakel
2022-03-09 02:34:15 +01:00
parent 7cab454a0a
commit eabe39df6e

View File

@@ -374,7 +374,27 @@ public class ConfigManager
public List<String> getConfigurationKeys(String prefix)
{
return properties.keySet().stream().filter(v -> ((String) v).startsWith(prefix)).map(String.class::cast).collect(Collectors.toList());
return properties.keySet().stream()
.map(String.class::cast)
.filter(k -> k.startsWith(prefix))
.collect(Collectors.toList());
}
public List<String> getRSProfileConfigurationKeys(String group, String profile, String keyPrefix)
{
if (profile == null)
{
return Collections.emptyList();
}
assert profile.startsWith(RSPROFILE_GROUP);
String prefix = group + "." + profile + "." + keyPrefix;
return properties.keySet().stream()
.map(String.class::cast)
.filter(k -> k.startsWith(prefix))
.map(k -> splitKey(k)[KEY_SPLITTER_KEY])
.collect(Collectors.toList());
}
public static String getWholeKey(String groupName, String profile, String key)