Skip to content

Commit 4e1c9be

Browse files
committed
Merge branch '2.14' into 2.15
2 parents 3168975 + c524e6b commit 4e1c9be

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/test-jdk14/java/com/fasterxml/jackson/databind/records/RecordFailingSetter3938Test.java

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.fasterxml.jackson.databind.records;
22

33
import com.fasterxml.jackson.annotation.JsonProperty;
4-
54
import com.fasterxml.jackson.databind.*;
65

76
public class RecordFailingSetter3938Test extends BaseMapTest
@@ -19,8 +18,7 @@ default void setOptions(JsonNode value) {
1918
}
2019
}
2120

22-
public record Command3938(int id, String filter) implements NoOptionsCommand {
23-
}
21+
public record Command3938(int id, String filter) implements NoOptionsCommand { }
2422

2523
private final ObjectMapper MAPPER = newJsonMapper();
2624

@@ -29,13 +27,13 @@ public void testFailingSetter3939() throws Exception
2927
{
3028
final ObjectReader R = MAPPER.readerFor(Command3938.class);
3129

32-
// First, missing value and `null` are fine
30+
// First, missing value and `null` are fine, as long as we have all fields
3331
assertNotNull(R.readValue(a2q("{'id':1, 'filter':'abc'}")));
34-
assertNotNull(R.readValue(a2q("{'id':2, 'filter':'def', 'options':null}")));
32+
assertNotNull(R.readValue(a2q("{'id':2, 'filter':'abc', 'options':null}")));
3533

3634
// But then failure for non-empty Array (f.ex)
3735
try {
38-
R.readValue(a2q("{'id':3, 'filter':'xyz', 'options':[ 123 ]}"));
36+
R.readValue(a2q("{'id':2,'options':[123]}}"));
3937
fail("Should not pass");
4038
} catch (DatabindException e) {
4139
verifyException(e, ERROR_3938_PREFIX);

0 commit comments

Comments
 (0)