fix: actually skip unsupported values in configs
ci/woodpecker/push/docs Pipeline was successful Details
ci/woodpecker/push/jfmod Pipeline was successful Details
ci/woodpecker/tag/docs Pipeline was successful Details
ci/woodpecker/tag/jfmod Pipeline was successful Details

This commit is contained in:
Johannes Frohnmeyer 2024-05-04 19:56:42 +02:00
parent d579c19f6b
commit 83d85abb17
Signed by: Johannes
GPG Key ID: E76429612C2929F4
1 changed files with 5 additions and 2 deletions

View File

@ -46,15 +46,18 @@ public class DefaultConfigIO {
reader.beginObject();
while (reader.peek() != Token.END_OBJECT) {
String name = reader.nextName();
if (!actions.containsKey(name)) {
DefaultConfigIO.Action action = actions.get(name);
if (action == null) {
LibJf.LOGGER.warn("Unrecognized key in config for " + id + ": " + name);
reader.skipValue();
continue;
}
if (!appeared.add(name)) {
LibJf.LOGGER.warn("Duplicate key in config for " + id + ": " + name);
reader.skipValue();
continue;
}
actions.get(name).task.accept(reader);
action.task.accept(reader);
}
reader.endObject();
actions.forEach((name, action) -> {