Skip to content

Commit b7c08e3

Browse files
committed
Fix some issues wrt databind changes
1 parent a248f73 commit b7c08e3

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

avro/src/main/java/tools/jackson/dataformat/avro/schema/RecordVisitor.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,7 @@ protected Schema.Field schemaFieldForWriter(BeanProperty prop, boolean optional)
170170
if (prop instanceof BeanPropertyWriter) {
171171
BeanPropertyWriter bpw = (BeanPropertyWriter) prop;
172172
ser = bpw.getSerializer();
173-
/*
174-
* 2-Mar-2017, bryan: AvroEncode annotation expects to have the schema used directly
175-
*/
173+
// 2-Mar-2017, bryan: AvroEncode annotation expects to have the schema used directly
176174
optional = optional && !(ser instanceof CustomEncodingSerializer); // Don't modify schema
177175
}
178176
final SerializerProvider prov = getProvider();

cbor/src/test/java/tools/jackson/dataformat/cbor/gen/dos/CyclicCBORDataSerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import java.util.List;
55

66
import tools.jackson.core.StreamWriteConstraints;
7-
7+
import tools.jackson.core.exc.StreamConstraintsException;
88
import tools.jackson.databind.*;
99

1010
import tools.jackson.dataformat.cbor.CBORTestBase;
@@ -23,11 +23,11 @@ public void testListWithSelfReference() throws Exception {
2323
try {
2424
MAPPER.writeValueAsBytes(list);
2525
fail("expected DatabindException");
26-
} catch (DatabindException jmex) {
26+
} catch (StreamConstraintsException e) {
2727
String exceptionPrefix = String.format("Document nesting depth (%d) exceeds the maximum allowed",
2828
StreamWriteConstraints.DEFAULT_MAX_DEPTH + 1);
2929
assertTrue("DatabindException message is as expected?",
30-
jmex.getMessage().startsWith(exceptionPrefix));
30+
e.getMessage().startsWith(exceptionPrefix));
3131
}
3232
}
3333
}

smile/src/test/java/tools/jackson/dataformat/smile/gen/dos/CyclicSmileDataSerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import java.util.List;
55

66
import tools.jackson.core.StreamWriteConstraints;
7-
7+
import tools.jackson.core.exc.StreamConstraintsException;
88
import tools.jackson.databind.*;
99

1010
import tools.jackson.dataformat.smile.BaseTestForSmile;
@@ -23,7 +23,7 @@ public void testListWithSelfReference() throws Exception {
2323
try {
2424
MAPPER.writeValueAsBytes(list);
2525
fail("expected JsonMappingException");
26-
} catch (DatabindException e) {
26+
} catch (StreamConstraintsException e) {
2727
String exceptionPrefix = String.format("Document nesting depth (%d) exceeds the maximum allowed",
2828
StreamWriteConstraints.DEFAULT_MAX_DEPTH + 1);
2929
assertTrue("DatabindException message is as expected?",

0 commit comments

Comments
 (0)