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
So. Looks like there is use case for something like:
public class VoidBean {
public Void getValue() { return null; }
(and possibly reverse, to allow "setter"... that simply assigns null?)
especially since that may be needed for idiomatic usage by other JVM language like Kotlin and Scala.
The root cause for this not yet working is that both void keyword AND Void.class type are considered to mean "Does not return value", even though only first really does that.
Relaxing this (in AnnotatedMethod method hasReturnType() solves the serialization case and there is probably something relatively similar for deserialization as well.
Since this is a change to low-level code, however, it is probably best to consider this only for 2.12, and not yet 2.11.0 (due release soon).
The text was updated successfully, but these errors were encountered:
cowtowncoder
changed the title
Support use of Void valued properties
Support use of Void valued properties (MapperFeature.ALLOW_VOID_VALUED_PROPERTIES)
May 7, 2020
(note: offshoot of FasterXML/jackson-module-kotlin#314)
So. Looks like there is use case for something like:
(and possibly reverse, to allow "setter"... that simply assigns
null
?)especially since that may be needed for idiomatic usage by other JVM language like Kotlin and Scala.
The root cause for this not yet working is that both
void
keyword ANDVoid.class
type are considered to mean "Does not return value", even though only first really does that.Relaxing this (in
AnnotatedMethod
methodhasReturnType()
solves the serialization case and there is probably something relatively similar for deserialization as well.Since this is a change to low-level code, however, it is probably best to consider this only for 2.12, and not yet 2.11.0 (due release soon).
The text was updated successfully, but these errors were encountered: