Skip to content

Commit 1e8e4b3

Browse files
committed
Overide AvroGenerator.getOutputContext()
1 parent 1fe3b5e commit 1e8e4b3

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

avro/src/main/java/com/fasterxml/jackson/dataformat/avro/AvroGenerator.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@ public Version version() {
178178
* Not sure what to do here; could reset indentation to some value maybe?
179179
*/
180180
@Override
181-
public AvroGenerator useDefaultPrettyPrinter()
182-
{
181+
public AvroGenerator useDefaultPrettyPrinter() {
183182
return this;
184183
}
185184

@@ -196,6 +195,11 @@ public Object getOutputTarget() {
196195
return _output;
197196
}
198197

198+
@Override
199+
public JsonStreamContext getOutputContext() {
200+
return _avroContext;
201+
}
202+
199203
/**
200204
* Unfortunately we have no visibility into buffering Avro codec does;
201205
* and need to return <code>-1</code> to reflect that lack of knowledge.
@@ -283,9 +287,7 @@ public JsonGenerator overrideFormatFeatures(int values, int mask) {
283287
/**********************************************************************
284288
*/
285289

286-
/* And then methods overridden to make final, streamline some
287-
* aspects...
288-
*/
290+
// And then methods overridden to make final, streamline some aspects...
289291

290292
@Override
291293
public final void writeFieldName(String name) throws IOException

release-notes/VERSION-2.x

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Project: jackson-datatypes-binaryModules:
1010

1111
2.11.0 (not yet released)
1212

13-
-
13+
- `AvroGenerator` overrides `getOutputContext()` properly
1414

1515
2.10.1 (09-Nov-2019)
1616

0 commit comments

Comments
 (0)