Skip to content

Commit

Permalink
Merge branch '2.19'
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 7, 2025
2 parents 0f305a0 + 7cbc141 commit 9333a7c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import com.fasterxml.jackson.annotation.*;

import tools.jackson.databind.MapperFeature;
import tools.jackson.databind.ObjectMapper;
import tools.jackson.databind.testutil.DatabindTestUtil;

Expand Down Expand Up @@ -88,7 +89,11 @@ public AsArrayWithViewAndCreator(@JsonProperty("a") int a,
/*****************************************************
*/

private final static ObjectMapper MAPPER = newJsonMapper();
// 06-Jan-2025, tatu: NOTE! need to make sure Default View Inclusion
// is enabled for tests to work as expected
private final static ObjectMapper MAPPER = jsonMapperBuilder()
.enable(MapperFeature.DEFAULT_VIEW_INCLUSION)
.build();

@Test
public void testWithView() throws Exception
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,13 @@ public void testWithCreator() throws Exception
@Test
public void testWithCreatorAndView() throws Exception
{
ObjectReader reader = MAPPER.readerFor(CreatorValue.class);
// 06-Jan-2025, tatu: NOTE! need to make sure Default View Inclusion
// is enabled for tests to work as expected
ObjectReader reader = jsonMapperBuilder()
.enable(MapperFeature.DEFAULT_VIEW_INCLUSION)
.build()
.readerFor(CreatorValue.class);

CreatorValue value;

// First including values in view
Expand Down

0 comments on commit 9333a7c

Please sign in to comment.