final @JsonProperty("maxRowsInMemory") Integer maxRowsInMemory@JsonProperty
public int getRowFlushBoundary()
{
return rowFlushBoundary;
}
configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
configure(MapperFeature.AUTO_DETECT_GETTERS, false);
// configure(MapperFeature.AUTO_DETECT_CREATORS, false); https://github.com/FasterXML/jackson-databind/issues/170
configure(MapperFeature.AUTO_DETECT_FIELDS, false);
configure(MapperFeature.AUTO_DETECT_IS_GETTERS, false);
configure(MapperFeature.AUTO_DETECT_SETTERS, false);
configure(SerializationFeature.INDENT_OUTPUT, false);
What sort of magic does Jackson do that I'm not aware of that could cause it to pick up the field even though there are no annotations for it to know how to inject the value?
Thanks for any insight you might have,Charles Allen--
You received this message because you are subscribed to the Google Groups "jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jackson-user...@googlegroups.com.
To post to this group, send email to jackso...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Neat. The thing that comes to mind is that jackson has settings that both tell it to treat a single JsonProperty annotation to apply to all similarly named properties -- or was that only JsonIgnore only? I think it's the former, but if the latter, there might also be a specific "mutator implies setter" option. In both cases, using JsonGetter instead on that method might fail your test.
Probably the bigger concern is that jackson will (very foolishly, but with the best intentions) try to let you deserialize into final fields after construction. I think that one is even almost certainly enabled by default.
So there's one or two properties that may or may not exist that associates the getter with the field even though it is final to check. You could specialize the annotation. Definitely turn off mutating final fields.
Doc version is old but whatever. Look, both settings are right next to each other! What a cute world.
Almost certainly! I hope in a future major release, jackson will disable writing to final fields by default, but hey, you can always use my wrapper library ;)
It tends to break pretty badly when certain kinds of references/forks get inlined into methods before being set.
Regardless, those aren't compelling reasons to keep it on by default.
--
Yeah, just making sure that was still the primary reason. Was why I originally prefixed the possibility of it changing as being part of a major release.