Skip to content

Commit 365fb69

Browse files
committed
Yet more #400 prep work
1 parent 323373d commit 365fb69

File tree

1 file changed

+2
-27
lines changed

1 file changed

+2
-27
lines changed

avro/src/main/java/com/fasterxml/jackson/dataformat/avro/apacheimpl/ApacheCodecRecycler.java

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
import org.apache.avro.io.*;
77

8-
import com.fasterxml.jackson.core.JsonProcessingException;
9-
108
/**
119
* Simple helper class that contains extracted functionality for
1210
* simple encoder/decoder recycling.
@@ -30,11 +28,11 @@ private ApacheCodecRecycler() { }
3028
*/
3129

3230
public static BinaryDecoder acquireDecoder() {
33-
return _recycler().claimDecoder();
31+
return _recycler().decoderRef.getAndSet(null);
3432
}
3533

3634
public static BinaryEncoder acquireEncoder() {
37-
return _recycler().claimEncoder();
35+
return _recycler().encoderRef.getAndSet(null);
3836
}
3937

4038
public static void release(BinaryDecoder dec) {
@@ -61,27 +59,4 @@ private static ApacheCodecRecycler _recycler() {
6159
}
6260
return r;
6361
}
64-
65-
private BinaryDecoder claimDecoder() {
66-
return decoderRef.getAndSet(null);
67-
}
68-
69-
private BinaryEncoder claimEncoder() {
70-
return encoderRef.getAndSet(null);
71-
}
72-
73-
/*
74-
/**********************************************************
75-
/* Helper class
76-
/**********************************************************
77-
*/
78-
79-
public static class BadSchemaException extends JsonProcessingException
80-
{
81-
private static final long serialVersionUID = 1L;
82-
83-
public BadSchemaException(String msg, Throwable src) {
84-
super(msg, src);
85-
}
86-
}
8762
}

0 commit comments

Comments
 (0)