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
Before Jackson 2.12, apparently it was possible to serialize ByteArrayOutputStream values as a POJO -- if (and only if) auto-detection of all visibility levels (including private) was enabled. If so, a POJO with buf and length fields were produced.
With 2.13 the default visibility settings for JDK types were changed to only detect public accessors; this also prevents custom default visibility from being applied. As a result, ByteArrayOutputStream values are no longer serializable.
But it might make sense to make it serializable again. However, the representation as POJO does not make sense: if serialization is to be used, it should:
Use public ByteArrayOutStream.toByteArray() to access content
Serialize contents as a Binary value: for JSON backend this means Base64-encoded String; for other backends whatever their representation of Binary values is
I realize that this behavior is different from the earlier one so it is an open question if this should be deferred until Jackson 3.0.
The text was updated successfully, but these errors were encountered:
(note: follow-up to #3493)
Before Jackson 2.12, apparently it was possible to serialize
ByteArrayOutputStream
values as a POJO -- if (and only if) auto-detection of all visibility levels (includingprivate
) was enabled. If so, a POJO withbuf
andlength
fields were produced.With 2.13 the default visibility settings for JDK types were changed to only detect
public
accessors; this also prevents custom default visibility from being applied. As a result,ByteArrayOutputStream
values are no longer serializable.But it might make sense to make it serializable again. However, the representation as POJO does not make sense: if serialization is to be used, it should:
ByteArrayOutStream.toByteArray()
to access contentI realize that this behavior is different from the earlier one so it is an open question if this should be deferred until Jackson 3.0.
The text was updated successfully, but these errors were encountered: