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
By default, Jackson will try to call setAccessible(true) on all methods and fields it has to access via Reflection. This is necessary for cases where member are non-public, but it has also been beneficial for other cases since doing so will suppress some access checks JVM would otherwise perform; this was benchmarked to have significant effect on JDK 1.5 at least.
It is possible to suppress all calls to setAccessible by disabling MapperFeature.CAN_OVERRIDE_ACCESS_MODIFIERS. This is needed on platforms where SecurityManager prevents all access.
However, it seems useful to also allow more granular change, to avoid calls for public members, and only try to make it for non-public cases where access would otherwise fail.
To do this, let's add new MapperFeature, OVERRIDE_PUBLIC_ACCESS_MODIFIERS in 2.7.
The text was updated successfully, but these errors were encountered:
(note: offshoot of #992)
By default, Jackson will try to call
setAccessible(true)
on all methods and fields it has to access via Reflection. This is necessary for cases where member are non-public, but it has also been beneficial for other cases since doing so will suppress some access checks JVM would otherwise perform; this was benchmarked to have significant effect on JDK 1.5 at least.It is possible to suppress all calls to
setAccessible
by disablingMapperFeature.CAN_OVERRIDE_ACCESS_MODIFIERS
. This is needed on platforms whereSecurityManager
prevents all access.However, it seems useful to also allow more granular change, to avoid calls for
public
members, and only try to make it for non-public cases where access would otherwise fail.To do this, let's add new
MapperFeature
,OVERRIDE_PUBLIC_ACCESS_MODIFIERS
in 2.7.The text was updated successfully, but these errors were encountered: