Skip to content

Commit 181f7fe

Browse files
committed
[BAEL-14274] - Fixed article code for https://www.baeldung.com/jackson-ignore-null-fields
1 parent 783a93f commit 181f7fe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

jackson-simple/src/test/java/com/baeldung/jackson/test/JacksonSerializationIgnoreUnitTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ protected final boolean include(final PropertyWriter writer) {
165165
}
166166

167167
@Test
168-
public final void givenIgnoringNullFieldsOnClass_whenWritingObjectWithNullField_thenFieldIsIgnored() throws JsonProcessingException {
168+
public final void givenNullsIgnoredOnClass_whenWritingObjectWithNullField_thenIgnored() throws JsonProcessingException {
169169
final ObjectMapper mapper = new ObjectMapper();
170170
final MyDtoIgnoreNull dtoObject = new MyDtoIgnoreNull();
171171

@@ -178,7 +178,7 @@ public final void givenIgnoringNullFieldsOnClass_whenWritingObjectWithNullField_
178178
}
179179

180180
@Test
181-
public final void givenIgnoringNullFieldsGlobally_whenWritingObjectWithNullField_thenIgnored() throws JsonProcessingException {
181+
public final void givenNullsIgnoredGlobally_whenWritingObjectWithNullField_thenIgnored() throws JsonProcessingException {
182182
final ObjectMapper mapper = new ObjectMapper();
183183
mapper.setSerializationInclusion(Include.NON_NULL);
184184
final MyDto dtoObject = new MyDto();

0 commit comments

Comments
 (0)