Skip to content

Commit 21f5671

Browse files
committed
sync with databind/5599
1 parent e7ccdc9 commit 21f5671

4 files changed

Lines changed: 7 additions & 31 deletions

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ public class ArrayVisitor
2323

2424
protected Schema _elementSchema;
2525

26-
public ArrayVisitor(SerializationContext p, JavaType type, VisitorFormatWrapperImpl visitorWrapper)
26+
public ArrayVisitor(SerializationContext p, JavaType type,
27+
VisitorFormatWrapperImpl visitorWrapper)
2728
{
2829
super(p);
2930
_type = type;

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public class MapVisitor extends JsonMapFormatVisitor.Base
1919

2020
protected JavaType _keyType;
2121

22-
public MapVisitor(SerializationContext p, JavaType type, VisitorFormatWrapperImpl visitorWrapper)
22+
public MapVisitor(SerializationContext p, JavaType type,
23+
VisitorFormatWrapperImpl visitorWrapper)
2324
{
2425
super(p);
2526
_type = type;
@@ -32,7 +33,7 @@ public Schema builtAvroSchema() {
3233
if (_valueSchema == null) {
3334
throw new IllegalStateException("Missing value type for "+_type);
3435
}
35-
AnnotatedClass ac = _provider.introspectClassAnnotations(_keyType);
36+
AnnotatedClass ac = getContext().introspectClassAnnotations(_keyType);
3637
if (AvroSchemaHelper.isStringable(ac)) {
3738
return AvroSchemaHelper.stringableKeyMapSchema(_type, _keyType, _valueSchema);
3839
}

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

Lines changed: 0 additions & 26 deletions
This file was deleted.

protobuf/src/main/java/tools/jackson/dataformat/protobuf/schemagen/MessageElementVisitor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ protected DataType getDataType(JavaType type)
106106
if (isNested(type)) {
107107
if (!_nestedTypes.contains(type)) { // create nested type
108108
_nestedTypes.add(type);
109-
ProtoBufSchemaVisitor builder = acceptTypeElement(_provider, type,
109+
ProtoBufSchemaVisitor builder = acceptTypeElement(getContext(), type,
110110
_definedTypeElementBuilders, true);
111111
DataType scalarType = builder.getSimpleType();
112112
if (scalarType != null){
@@ -115,7 +115,7 @@ protected DataType getDataType(JavaType type)
115115
_builder.addType(builder.build());
116116
}
117117
} else { // track non-nested types to generate them later
118-
ProtoBufSchemaVisitor builder = acceptTypeElement(_provider, type,
118+
ProtoBufSchemaVisitor builder = acceptTypeElement(getContext(), type,
119119
_definedTypeElementBuilders, false);
120120
DataType scalarType = builder.getSimpleType();
121121
if (scalarType != null){

0 commit comments

Comments
 (0)