Skip to content

Commit

Permalink
ONe last fix to failing->tofix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Sep 21, 2024
1 parent e36414f commit 8553324
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tools.jackson.failing;
package tools.jackson.databind.tofix;

import java.util.ArrayList;
import java.util.Iterator;
Expand All @@ -14,6 +14,7 @@
import tools.jackson.databind.deser.std.DelegatingDeserializer;
import tools.jackson.databind.json.JsonMapper;
import tools.jackson.databind.testutil.DatabindTestUtil;
import tools.jackson.databind.testutil.failure.JacksonTestFailureExpected;
import tools.jackson.databind.type.CollectionLikeType;

import static org.junit.jupiter.api.Assertions.assertSame;
Expand Down Expand Up @@ -84,12 +85,12 @@ public ParentSettingDeserializer(ValueDeserializer<?> delegatee) {
}

@Override
public Object deserialize(JsonParser jp, DeserializationContext ctxt) throws JacksonException {
Object retValue = super.deserialize(jp, ctxt);
public Object deserialize(JsonParser p, DeserializationContext ctxt) throws JacksonException {
Object retValue = super.deserialize(p, ctxt);
if (retValue instanceof HasParent) {
HasParent obj = (HasParent) retValue;
Parent parent = null;
TokenStreamContext parsingContext = jp.streamReadContext();
TokenStreamContext parsingContext = p.streamReadContext();
while (parent == null && parsingContext != null) {
Object currentValue = parsingContext.currentValue();
if (currentValue != null && currentValue instanceof Parent) {
Expand Down Expand Up @@ -184,6 +185,7 @@ public void setupModule(SetupContext context) {
" }\n" +
"}";

@JacksonTestFailureExpected
@Test
public void testReadNoBuffering() throws Exception {
Parent obj = objectMapper.readerFor(Parent.class).readValue(JSON);
Expand All @@ -193,6 +195,7 @@ public void testReadNoBuffering() throws Exception {
}
}

@JacksonTestFailureExpected
@Test
public void testReadFromTree() throws Exception {
JsonNode tree = objectMapper.readTree(JSON);
Expand Down

0 comments on commit 8553324

Please sign in to comment.