Skip to content

Commit

Permalink
Ensure compatibility with Jackson 2.16.x
Browse files Browse the repository at this point in the history
  • Loading branch information
pivovarit committed Oct 13, 2024
1 parent 2b647da commit 536c1fb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public CharSeq deserialize(JsonParser p, DeserializationContext ctxt) throws IOE
if (obj instanceof String) {
return CharSeq.of((String) obj);
} else {
throw ctxt.wrongTokenException(p, JsonToken.VALUE_STRING, "CharSeq can only be deserialized from String");
String msg = String.format("%s: CharSeq can only be deserialized from String", String.format("Unexpected token (%s), expected %s", p.getCurrentToken(), JsonToken.VALUE_STRING));
throw JsonMappingException.from(p, msg);
}
}

Expand Down

0 comments on commit 536c1fb

Please sign in to comment.