Skip to content

Commit

Permalink
Fix #2149 (add MapperFeature.ACCEPT_CASE_INSENSITIVE_VALUES)
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Sep 10, 2019
1 parent 5dfd86f commit d1a213e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Project: jackson-databind

2.10.0-final (not yet released)

#2149: Add `MapperFeature.ACCEPT_CASE_INSENSITIVE_VALUES`
(suggested by Craig P)
#2309: READ_ENUMS_USING_TO_STRING doesn't support null values
(reported, fix suggested by Ben A)
#2442: `ArrayNode.addAll()` adds raw `null` values which cause NPE on `deepCopy()`
Expand Down
18 changes: 16 additions & 2 deletions src/main/java/com/fasterxml/jackson/databind/MapperFeature.java
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public enum MapperFeature implements ConfigFeature
*<p>
* Note that there is additional performance overhead since incoming property
* names need to be lower-cased before comparison, for cases where there are upper-case
* letters. Overhead for names that are already lower-case should be negligible however.
* letters. Overhead for names that are already lower-case should be negligible.
*<p>
* Feature is disabled by default.
*
Expand All @@ -373,7 +373,7 @@ public enum MapperFeature implements ConfigFeature
/**
* Feature that determines if Enum deserialization should be case sensitive or not.
* If enabled, Enum deserialization will ignore case, that is, case of incoming String
* value and enum id (dependant on other settings, either `name()`, `toString()`, or
* value and enum id (depending on other settings, either `name()`, `toString()`, or
* explicit override) do not need to match.
* <p>
* Feature is disabled by default.
Expand All @@ -382,6 +382,20 @@ public enum MapperFeature implements ConfigFeature
*/
ACCEPT_CASE_INSENSITIVE_ENUMS(false),

/**
* Feature that permits parsing some enumerated text-based value types but ignoring the case
* of the values on deserialization: for example, date/time type deserializers.
* Support for this feature depends on deserializer implementations using it.
*<p>
* Note, however, that regular {@code Enum} types follow {@link #ACCEPT_CASE_INSENSITIVE_ENUMS}
* setting instead.
*<p>
* Feature is disabled by default.
*
* @since 2.10
*/
ACCEPT_CASE_INSENSITIVE_VALUES(false),

/**
* Feature that can be enabled to make property names be
* overridden by wrapper name (usually detected with annotations
Expand Down

0 comments on commit d1a213e

Please sign in to comment.