Skip to content

Commit 2d80120

Browse files
committed
Merge branch '2.7'
2 parents 02a803a + 0aa6486 commit 2d80120

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

release-notes/CREDITS

+5
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,10 @@ Brian Pontarelli (voidmain@github)
472472
* Reported #1301: Problem with `JavaType.toString()` for recursive (self-referential) types
473473
(2.7.6)
474474

475+
Max Drobotov (fizmax@github)
476+
* Reported, contributed fix for #1332: `ArrayIndexOutOfBoundException` for enum by index deser
477+
(2.7.7)
478+
475479
Artur Jonkisz (ajonkisz@github)
476480
* Reported #960: `@JsonCreator` not working on a factory with no arguments for ae enum type
477481
(2.8.0)
@@ -521,3 +525,4 @@ Arek Gabiga (arekgabiga@github)
521525
Chris Jester-Young (cky@github)
522526
* Contributed #1335: Unconditionally call `TypeIdResolver.getDescForKnownTypeIds`
523527
(2.8.2)
528+

release-notes/VERSION

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ Project: jackson-databind
7575

7676
#1322: EnumMap keys not using enum's `@JsonProperty` values unlike Enum values
7777
(reported by MichaelChambers@github)
78+
#1332: Fixed ArrayIndexOutOfBoundException for enum by index deser
79+
(reported by Max D)
7880

7981
2.7.6 (23-Jul-2016)
8082

src/main/java/com/fasterxml/jackson/databind/deser/std/EnumDeserializer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ private final Object _deserializeAltString(JsonParser p, DeserializationContext
178178
"not allowed to deserialize Enum value out of number: disable DeserializationConfig.DeserializationFeature.FAIL_ON_NUMBERS_FOR_ENUMS to allow"
179179
);
180180
}
181-
if (index >= 0 && index <= _enumsByIndex.length) {
181+
if (index >= 0 && index < _enumsByIndex.length) {
182182
return _enumsByIndex[index];
183183
}
184184
} catch (NumberFormatException e) {

0 commit comments

Comments
 (0)