Skip to content

Commit 66e8ac6

Browse files
committed
Javadoc improvements: add a note to MapperFeature#CAN_OVERRIDE_ACCESS_MODIFIERS indicating that disabling can have drastic performance consequences.
1 parent d7d31ca commit 66e8ac6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main/java/com/fasterxml/jackson/databind/MapperFeature.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,18 @@ public enum MapperFeature implements ConfigFeature
151151
* may be called to enable access to otherwise unaccessible
152152
* objects.
153153
*<p>
154+
* Note that this setting usually has significant performance implications,
155+
* since access override helps remove costly access checks on each
156+
* and every Reflection access. If you are considering disabling
157+
* this feature, be sure to verify performance consequences if usage
158+
* is performance sensitive.
159+
* Especially on standard JavaSE platforms difference is significant.
160+
*<p>
161+
* Conversely, on some platforms, it may be necessary to disable this feature
162+
* as platform does not allow such calls. For example, when developing
163+
* Applets (or other Java code that runs on tightly restricted sandbox),
164+
* it may be necessary to disable the feature regardless of performance effects.
165+
*<p>
154166
* Feature is enabled by default.
155167
*/
156168
CAN_OVERRIDE_ACCESS_MODIFIERS(true),

0 commit comments

Comments
 (0)