Skip to content

Commit d35bd28

Browse files
committed
ice: Fix trailing tokens being ignored when parsing CLI inputs
1 parent dbf188e commit d35bd28

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ice/src/main/java/com/altinity/ice/cli/Main.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,9 +523,10 @@ private RESTCatalog loadCatalog() throws IOException {
523523
return loadCatalog(this.configFile());
524524
}
525525

526-
private ObjectMapper newObjectMapper() {
526+
private static ObjectMapper newObjectMapper() {
527527
ObjectMapper om = new ObjectMapper(new YAMLFactory());
528528
om.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true);
529+
om.configure(DeserializationFeature.FAIL_ON_TRAILING_TOKENS, true);
529530
return om;
530531
}
531532

ice/src/main/java/com/altinity/ice/internal/config/Config.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public static <T> T load(
3737
}
3838
ObjectMapper om = new ObjectMapper(new YAMLFactory());
3939
om.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true);
40+
om.configure(DeserializationFeature.FAIL_ON_TRAILING_TOKENS, true);
4041
// TODO: support env var interpolation
4142
try {
4243
return om.readValue(v, type);

0 commit comments

Comments
 (0)