Remove JsonSerializer.isEmpty()
from 3.0
#2040
Labels
3.x
Issues to be only tackled for Jackson 3.x, not 2.x
JsonSerializer.isEmpty()
from 3.0
#2040
Actually it is not an issue, but improvement request.
Now Base.isEmpty from JsonSerializable takes SerializerProvider as parameter.After some research I found out, that this class is extended by lots of other classes in jackson-databind and most of them use default implementation from Base (it returns false). Only ArrayNode & ObjectNode override isEmpty, but SerializerProvider is not used at all.
Using isEmpty method, you have three generic ways how to deal with it in client code:
The proposal is to remove this unused parameter from method signature in 3.0 or other major release if there are no counter arguments. Overloading is the option too(and even can be added in minor release), it saves backward compatibility (and brings new uncertainty, which method to use, too :-) )
The text was updated successfully, but these errors were encountered: