File tree Expand file tree Collapse file tree 5 files changed +42
-6
lines changed
avro/src/main/java/com/fasterxml/jackson/dataformat/avro
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor
ion/src/main/java/com/fasterxml/jackson/dataformat/ion
protobuf/src/main/java/com/fasterxml/jackson/dataformat/protobuf
smile/src/main/java/com/fasterxml/jackson/dataformat/smile Expand file tree Collapse file tree 5 files changed +42
-6
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,14 @@ public AvroFactory copy() {
140
140
return new AvroFactory (this );
141
141
}
142
142
143
+ /**
144
+ * Instances are immutable so just return `this`
145
+ */
146
+ @ Override
147
+ public TokenStreamFactory snapshot () {
148
+ return this ;
149
+ }
150
+
143
151
/*
144
152
/**********************************************************
145
153
/* Serializable overrides
Original file line number Diff line number Diff line change @@ -132,6 +132,14 @@ public CBORFactory copy() {
132
132
return new CBORFactory (this );
133
133
}
134
134
135
+ /**
136
+ * Instances are immutable so just return `this`
137
+ */
138
+ @ Override
139
+ public TokenStreamFactory snapshot () {
140
+ return this ;
141
+ }
142
+
135
143
/*
136
144
/**********************************************************
137
145
/* Serializable overrides
Original file line number Diff line number Diff line change @@ -136,12 +136,18 @@ public static IonFactoryBuilder builderForTextualWriters() {
136
136
}
137
137
138
138
@ Override
139
- public IonFactory copy ()
140
- {
141
- // note: as with base class, must NOT copy mapper reference
139
+ public IonFactory copy () {
142
140
return new IonFactory (this );
143
141
}
144
142
143
+ /**
144
+ * Instances are immutable so just return `this`
145
+ */
146
+ @ Override
147
+ public TokenStreamFactory snapshot () {
148
+ return this ;
149
+ }
150
+
145
151
/*
146
152
/**********************************************************
147
153
/* Basic introspection
Original file line number Diff line number Diff line change @@ -53,6 +53,14 @@ public ProtobufFactory copy(){
53
53
return new ProtobufFactory (this );
54
54
}
55
55
56
+ /**
57
+ * Instances are immutable so just return `this`
58
+ */
59
+ @ Override
60
+ public TokenStreamFactory snapshot () {
61
+ return this ;
62
+ }
63
+
56
64
/*
57
65
/**********************************************************
58
66
/* Serializable overrides
Original file line number Diff line number Diff line change @@ -140,11 +140,18 @@ public static SmileFactoryBuilder builder() {
140
140
}
141
141
142
142
@ Override
143
- public SmileFactory copy ()
144
- {
143
+ public SmileFactory copy () {
145
144
return new SmileFactory (this );
146
145
}
147
146
147
+ /**
148
+ * Instances are immutable so just return `this`
149
+ */
150
+ @ Override
151
+ public TokenStreamFactory snapshot () {
152
+ return this ;
153
+ }
154
+
148
155
/*
149
156
/**********************************************************
150
157
/* Serializable overrides
@@ -154,7 +161,6 @@ public SmileFactory copy()
154
161
/**
155
162
* Method that we need to override to actually make restoration go
156
163
* through constructors etc.
157
- * Also: must be overridden by sub-classes as well.
158
164
*/
159
165
protected Object readResolve () {
160
166
return new SmileFactory (this );
You can’t perform that action at this time.
0 commit comments