Skip to content

Commit eb71d68

Browse files
committed
Fix last erroneously failing tests wrt #3406
1 parent b672adf commit eb71d68

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/test/java/com/fasterxml/jackson/databind/jsontype/ext/ExternalTypeIdTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ public Orange(@JsonProperty("name") String name, @JsonProperty("name") String co
610610
public void testIssue3008() throws Exception
611611
{
612612
ObjectReader r = MAPPER.readerFor(Box3008.class);
613-
Box3008 deserOrangeBox = r.readValue("{\"type\":null,\"fruit\":null}}");
613+
Box3008 deserOrangeBox = r.readValue("{\"type\":null,\"fruit\":null}");
614614
assertNull(deserOrangeBox.fruit);
615615
assertNull(deserOrangeBox.type); // error: "expected null, but was:<null>"
616616
}

src/test/java/com/fasterxml/jackson/databind/jsontype/ext/ExternalTypeIdWithCreatorTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public void testExternalTypeId() throws Exception
111111
// [databind#1198]
112112
@Test
113113
public void testFails() throws Exception {
114-
String json = "{ \"name\": \"foo\", \"attack\":\"right\" } }";
114+
String json = "{ \"name\": \"foo\", \"attack\":\"right\" } ";
115115

116116
Character character = MAPPER.readValue(json, Character.class);
117117

@@ -123,7 +123,7 @@ public void testFails() throws Exception {
123123
// [databind#1198]
124124
@Test
125125
public void testWorks() throws Exception {
126-
String json = "{ \"name\": \"foo\", \"preferredAttack\": \"KICK\", \"attack\":\"right\" } }";
126+
String json = "{ \"name\": \"foo\", \"preferredAttack\": \"KICK\", \"attack\":\"right\" }";
127127

128128
Character character = MAPPER.readValue(json, Character.class);
129129

src/test/java/com/fasterxml/jackson/databind/jsontype/ext/TestPropertyCreatorSubtypesExternalPropertyMissingProperty.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ public static Orange getOrange(@JsonProperty("name") String name, @JsonProperty(
104104
private static final Orange orange = new Orange("Orange", "orange");
105105
private static final Box orangeBox = new Box("orange", orange);
106106
private static final String orangeBoxJson = "{\"type\":\"orange\",\"fruit\":{\"name\":\"Orange\",\"color\":\"orange\"}}";
107-
private static final String orangeBoxNullJson = "{\"type\":\"orange\",\"fruit\":null}}";
108-
private static final String orangeBoxEmptyJson = "{\"type\":\"orange\",\"fruit\":{}}}";
109-
private static final String orangeBoxMissingJson = "{\"type\":\"orange\"}}";
107+
private static final String orangeBoxNullJson = "{\"type\":\"orange\",\"fruit\":null}";
108+
private static final String orangeBoxEmptyJson = "{\"type\":\"orange\",\"fruit\":{}}";
109+
private static final String orangeBoxMissingJson = "{\"type\":\"orange\"}";
110110

111111
private static final Apple apple = new Apple("Apple", 16);
112112
private static Box appleBox = new Box("apple", apple);

src/test/java/com/fasterxml/jackson/databind/jsontype/ext/TestSubtypesExternalPropertyMissingProperty.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ public Orange(String name, String c) {
101101
private static final Orange orange = new Orange("Orange", "orange");
102102
private static final Box orangeBox = new Box("orange", orange);
103103
private static final String orangeBoxJson = "{\"type\":\"orange\",\"fruit\":{\"name\":\"Orange\",\"color\":\"orange\"}}";
104-
private static final String orangeBoxNullJson = "{\"type\":\"orange\",\"fruit\":null}}";
105-
private static final String orangeBoxEmptyJson = "{\"type\":\"orange\",\"fruit\":{}}}";
106-
private static final String orangeBoxMissingJson = "{\"type\":\"orange\"}}";
104+
private static final String orangeBoxNullJson = "{\"type\":\"orange\",\"fruit\":null}";
105+
private static final String orangeBoxEmptyJson = "{\"type\":\"orange\",\"fruit\":{}}";
106+
private static final String orangeBoxMissingJson = "{\"type\":\"orange\"}";
107107

108108
private static final Apple apple = new Apple("Apple", 16);
109109
private static final Box appleBox = new Box("apple", apple);

0 commit comments

Comments
 (0)