Minor cleanup for `ObjectCodec`
diff --git a/src/main/java/com/fasterxml/jackson/core/ObjectCodec.java b/src/main/java/com/fasterxml/jackson/core/ObjectCodec.java
index 649c89f..afa6aaa 100644
--- a/src/main/java/com/fasterxml/jackson/core/ObjectCodec.java
+++ b/src/main/java/com/fasterxml/jackson/core/ObjectCodec.java
@@ -26,9 +26,9 @@
{
protected ObjectCodec() { }
- // Since 2.3: need baseline implementation to avoid backwards compatibility
+ // Since 2.3
@Override
- public Version version() { return Version.unknownVersion(); }
+ public abstract Version version();
/*
/**********************************************************
@@ -46,8 +46,8 @@
* The reason is that due to type erasure, key and value types
* can not be introspected when using this method.
*/
- public abstract <T> T readValue(JsonParser jp, Class<T> valueType)
- throws IOException, JsonProcessingException;
+ public abstract <T> T readValue(JsonParser p, Class<T> valueType)
+ throws IOException;
/**
* Method to deserialize JSON content into a Java type, reference
@@ -56,8 +56,8 @@
* and specifically needs to be used if the root type is a
* parameterized (generic) container type.
*/
- public abstract <T> T readValue(JsonParser jp, TypeReference<?> valueTypeRef)
- throws IOException, JsonProcessingException;
+ public abstract <T> T readValue(JsonParser p, TypeReference<?> valueTypeRef)
+ throws IOException;
/**
* Method to deserialize JSON content into a POJO, type specified
@@ -65,30 +65,30 @@
* including containers like {@link java.util.Collection} and
* {@link java.util.Map}).
*/
- public abstract <T> T readValue(JsonParser jp, ResolvedType valueType)
- throws IOException, JsonProcessingException;
+ public abstract <T> T readValue(JsonParser p, ResolvedType valueType)
+ throws IOException;
/**
* Method for reading sequence of Objects from parser stream,
* all with same specified value type.
*/
- public abstract <T> Iterator<T> readValues(JsonParser jp, Class<T> valueType)
- throws IOException, JsonProcessingException;
+ public abstract <T> Iterator<T> readValues(JsonParser p, Class<T> valueType)
+ throws IOException;
/**
* Method for reading sequence of Objects from parser stream,
* all with same specified value type.
*/
- public abstract <T> Iterator<T> readValues(JsonParser jp, TypeReference<?> valueTypeRef)
- throws IOException, JsonProcessingException;
+ public abstract <T> Iterator<T> readValues(JsonParser p, TypeReference<?> valueTypeRef)
+ throws IOException;
/**
* Method for reading sequence of Objects from parser stream,
* all with same specified value type.
*/
- public abstract <T> Iterator<T> readValues(JsonParser jp, ResolvedType valueType)
- throws IOException, JsonProcessingException;
-
+ public abstract <T> Iterator<T> readValues(JsonParser p, ResolvedType valueType)
+ throws IOException;
+
/*
/**********************************************************
/* API for serialization (Object-to-JSON)
@@ -99,8 +99,7 @@
* Method to serialize given Java Object, using generator
* provided.
*/
- public abstract void writeValue(JsonGenerator jgen, Object value)
- throws IOException, JsonProcessingException;
+ public abstract void writeValue(JsonGenerator gen, Object value) throws IOException;
/*
/**********************************************************
@@ -116,15 +115,13 @@
* value event, not container). Empty or whitespace
* documents return null.
*
- * @return next tree from jp, or null if empty.
+ * @return next tree from p, or null if empty.
*/
@Override
- public abstract <T extends TreeNode> T readTree(JsonParser jp)
- throws IOException, JsonProcessingException;
+ public abstract <T extends TreeNode> T readTree(JsonParser p) throws IOException;
@Override
- public abstract void writeTree(JsonGenerator jg, TreeNode tree)
- throws IOException, JsonProcessingException;
+ public abstract void writeTree(JsonGenerator gen, TreeNode tree) throws IOException;
/**
* Method for construct root level Object nodes