Skip to content

Commit ac29a4a

Browse files
committed
Move test back under "tofix"
1 parent ac8c6f8 commit ac29a4a

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/test/java/tools/jackson/databind/format/MapFormatShape5405Test.java renamed to src/test/java/tools/jackson/databind/tofix/MapFormatShape5405Test.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tools.jackson.databind.format;
1+
package tools.jackson.databind.tofix;
22

33
import java.util.*;
44

@@ -10,6 +10,7 @@
1010

1111
import tools.jackson.databind.*;
1212
import tools.jackson.databind.testutil.DatabindTestUtil;
13+
import tools.jackson.databind.testutil.failure.JacksonTestFailureExpected;
1314

1415
import static org.junit.jupiter.api.Assertions.assertEquals;
1516

@@ -68,17 +69,21 @@ public Bean5405Override(int value) {
6869

6970
private final ObjectMapper MAPPER = newJsonMapper();
7071

72+
// [databind#5045]: property overrides for @JsonFormat.shape won't work for Maps
73+
// 30-Nov-2025, tatu: Something about caching is the issue: if "b" commented out,
74+
// override appears to work; with "b" not
75+
@JacksonTestFailureExpected
7176
@Test
72-
public void testSerializeAsPOJOViaProperty() throws Exception
77+
public void serializeAsPOJOViaProperty() throws Exception
7378
{
74-
String result = MAPPER.writeValueAsString(new Bean5405Container(1,0,3));
79+
String result = MAPPER.writeValueAsString(new Bean5405Container(1,2,3));
7580
assertEquals(a2q(
76-
"{'a':{'extra':13,'empty':false},'c':{'extra':13,'empty':false}}"),
81+
"{'a':{'extra':13,'empty':false},'b':{'value':2},'c':{'extra':13,'empty':false}}"),
7782
result);
7883
}
7984

8085
@Test
81-
public void testSerializeNaturalViaOverride() throws Exception
86+
public void serializeNaturalViaOverride() throws Exception
8287
{
8388
String result = MAPPER.writeValueAsString(new Bean5405Override(123));
8489
assertEquals(a2q("{'stuff':{'value':123}}"),

0 commit comments

Comments
 (0)