Skip to content

Commit

Permalink
Update release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 16, 2024
1 parent fe3f568 commit 8211306
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.fasterxml.jackson.datatype.jsr310.ser;

import java.time.Month;
import java.util.function.Supplier;

import com.fasterxml.jackson.databind.BeanDescription;
import com.fasterxml.jackson.databind.JavaType;
Expand All @@ -28,5 +27,4 @@ public JsonSerializer<?> modifyEnumSerializer(SerializationConfig config, JavaTy
}
return serializer;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public OneBasedMonthSerializer(JsonSerializer<?> defaultSerializer)
public void serialize(Month value, JsonGenerator gen, SerializerProvider ctxt)
throws IOException
{
// 15-Jan-2024, tatu: [modules-java8#274] This is not really sufficient
// (see `jackson-databind` `EnumSerializer` for full logic), but has to
// do for now. May need to add `@JsonFormat.shape` handling in future.
if (ctxt.isEnabled(SerializationFeature.WRITE_ENUMS_USING_INDEX)) {
gen.writeNumber(value.ordinal() + 1);
return;
Expand Down
9 changes: 9 additions & 0 deletions release-notes/CREDITS-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,12 @@ Harald Kuhr (haraldk@github)
* Reported #286: Breaking change in `InstantDeserializer API between 2.15 and 2.16
(2.16.1)

Christoffer Hammarström (@kreiger)
* Reported #274: Deserializing `java.time.Month` from an int causes an off-by-one
error (`0`->`Jan`,`11`->`Dec`), because it's an enum
(2.17.0)

Emanuel Trandafir (@etrandafir93)
* Contribtued fix for #274: Deserializing `java.time.Month` from an int causes an off-by-one
error (`0`->`Jan`,`11`->`Dec`), because it's an enum
(2.17.0)
5 changes: 4 additions & 1 deletion release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ Modules:

2.17.0 (not yet released)

-
#274: Deserializing `java.time.Month` from an int causes an off-by-one
error (`0`->`Jan`,`11`->`Dec`), because it's an enum
(reported by Christoffer H)
(fix contributed Emanuel T)

2.16.1 (not yet released)

Expand Down

0 comments on commit 8211306

Please sign in to comment.