sort registry items in error message

This commit is contained in:
dfsek
2021-10-17 11:27:05 -07:00
parent 1892dd1c37
commit f5fdb6cb30

View File

@@ -38,7 +38,7 @@ public class OpenRegistryImpl<T> implements OpenRegistry<T> {
@Override
public T load(AnnotatedType type, Object o, ConfigLoader configLoader) throws LoadException {
T obj = get((String) o);
String list = objects.keySet().stream().reduce("", (a, b) -> a + "\n - " + b);
String list = objects.keySet().stream().sorted().reduce("", (a, b) -> a + "\n - " + b);
if(objects.isEmpty()) list = "[ ]";