Do not add null values to the config
@@ -66,6 +66,10 @@ public AnnotatedConfig(Object obj) {
throw new ConfigException("Unable to read field: " + field);
}
+ if (value == null) {
+ continue;
+ }
+
Map<String, String> section = values.getOrDefault(annotation.section(), new HashMap<>());
section.put(annotation.name(), String.valueOf(value));
values.put(annotation.section(), section);
