Skip to content

Commit 5f4148e

Browse files
committed
Fix to 2.x/3.x test diff
1 parent 8bad264 commit 5f4148e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/test/java/com/fasterxml/jackson/databind/ser/jdk/UUIDSerializationTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.fasterxml.jackson.annotation.JsonFormat;
77

88
import com.fasterxml.jackson.databind.*;
9+
import com.fasterxml.jackson.databind.json.JsonMapper;
910

1011
public class UUIDSerializationTest extends BaseMapTest
1112
{
@@ -73,9 +74,11 @@ public void testShapeOverrides() throws Exception
7374
MAPPER.writeValueAsString(new UUIDWrapperVanilla(nullUUID)));
7475

7576
// but can also override by type
76-
ObjectMapper m = newJsonMapper();
77-
m.configOverride(UUID.class)
78-
.setFormat(JsonFormat.Value.forShape(JsonFormat.Shape.BINARY));
77+
ObjectMapper m = JsonMapper.builder()
78+
.withConfigOverride(UUID.class,
79+
cfg -> cfg.setFormat(JsonFormat.Value.forShape(JsonFormat.Shape.BINARY))
80+
)
81+
.build();
7982
assertEquals("{\"uuid\":\"AAAAAAAAAAAAAAAAAAAAAA==\"}",
8083
m.writeValueAsString(new UUIDWrapperVanilla(nullUUID)));
8184
}

0 commit comments

Comments
 (0)