You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Variation of the AnySetterTest.java test...
Following code fails at assertEquals(true, entry.stuff.get("extra")) because value in stuff is a string, not a boolean. Expected that setting CsvSchema.ColumnType.BOOLEAN on the schema would cause mapper to pass a boolean to @JsonAnySetter method:
static class Entry {
Map<String,Object> stuff = new LinkedHashMap<String,Object>();
public int age;
public String name;
@JsonAnySetter
public void set(String key, Object value) {
// for secondary test, where name remains empty:
if (key.isEmpty()) {
key = String.valueOf(stuff.size());
}
stuff.put(key, value);
}
}
The text was updated successfully, but these errors were encountered:
At this point schema type is not used much for anything, but I agree it should.
Any-setter is one example; another would be JsonNode (tree) which also should use coerced type.
Variation of the AnySetterTest.java test...
Following code fails at
assertEquals(true, entry.stuff.get("extra"))
because value instuff
is a string, not a boolean. Expected that settingCsvSchema.ColumnType.BOOLEAN
on the schema would cause mapper to pass a boolean to@JsonAnySetter
method:Unchanged from original test:
The text was updated successfully, but these errors were encountered: