Skip to content

Commit 38f2780

Browse files
committed
Remove finality of methods in type (de)serializer implementations.
1 parent 8e9da38 commit 38f2780

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

src/main/java/com/fasterxml/jackson/databind/jsontype/impl/AsArrayTypeDeserializer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public Object deserializeTypedFromAny(JsonParser jp, DeserializationContext ctxt
8080
* deserialization.
8181
*/
8282
@SuppressWarnings("resource")
83-
private final Object _deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException
83+
protected Object _deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException
8484
{
8585
// 02-Aug-2013, tatu: May need to use native type ids
8686
if (jp.canReadTypeId()) {
@@ -116,7 +116,7 @@ private final Object _deserialize(JsonParser jp, DeserializationContext ctxt) th
116116
return value;
117117
}
118118

119-
protected final String _locateTypeId(JsonParser jp, DeserializationContext ctxt) throws IOException
119+
protected String _locateTypeId(JsonParser jp, DeserializationContext ctxt) throws IOException
120120
{
121121
if (!jp.isExpectedStartArrayToken()) {
122122
// Need to allow even more customized handling, if something unexpected seen...

src/main/java/com/fasterxml/jackson/databind/jsontype/impl/AsPropertyTypeDeserializer.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* when typed object is expressed as JSON Object; otherwise behaves similar to how
1818
* {@link As#WRAPPER_ARRAY} works.
1919
* Latter is used if JSON representation is polymorphic
20-
*
21-
* @author tatu
2220
*/
2321
public class AsPropertyTypeDeserializer extends AsArrayTypeDeserializer
2422
{
@@ -104,7 +102,7 @@ public Object deserializeTypedFromObject(JsonParser jp, DeserializationContext c
104102
}
105103

106104
@SuppressWarnings("resource")
107-
protected final Object _deserializeTypedForId(JsonParser jp, DeserializationContext ctxt, TokenBuffer tb) throws IOException
105+
protected Object _deserializeTypedForId(JsonParser jp, DeserializationContext ctxt, TokenBuffer tb) throws IOException
108106
{
109107
String typeId = jp.getText();
110108
JsonDeserializer<Object> deser = _findDeserializer(ctxt, typeId);

src/main/java/com/fasterxml/jackson/databind/jsontype/impl/AsPropertyTypeSerializer.java

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
* use JSON Object). If this is not possible (for JSON Arrays, scalars),
1515
* uses a JSON Array wrapper (similar to how
1616
* {@link As#WRAPPER_ARRAY} always works) as a fallback.
17-
*
18-
* @author tatus
1917
*/
2018
public class AsPropertyTypeSerializer
2119
extends AsArrayTypeSerializer

src/main/java/com/fasterxml/jackson/databind/jsontype/impl/AsWrapperTypeDeserializer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class AsWrapperTypeDeserializer
2121
extends TypeDeserializerBase
2222
implements java.io.Serializable
2323
{
24-
private static final long serialVersionUID = 5345570420394408290L;
24+
private static final long serialVersionUID = 1L;
2525

2626
public AsWrapperTypeDeserializer(JavaType bt, TypeIdResolver idRes,
2727
String typePropertyName, boolean typeIdVisible, Class<?> defaultImpl)
@@ -76,7 +76,7 @@ public Object deserializeTypedFromAny(JsonParser jp, DeserializationContext ctxt
7676
* deserialization.
7777
*/
7878
@SuppressWarnings("resource")
79-
private final Object _deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException
79+
protected Object _deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException
8080
{
8181
// 02-Aug-2013, tatu: May need to use native type ids
8282
if (jp.canReadTypeId()) {

0 commit comments

Comments
 (0)