File tree 3 files changed +15
-4
lines changed
main/java/com/fasterxml/jackson/databind
test/java/com/fasterxml/jackson/databind/node
3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,13 @@ Project: jackson-databind
4
4
=== Releases ===
5
5
------------------------------------------------------------------------
6
6
7
- 2.12.0 (not yet released)
7
+
8
+ 2.12.0 -rc2 (not yet released)
9
+
10
+ #2878 : Revert change initially made to fix #2805 : change in signature
11
+ of `ObjectMapper.treeToValue()` regarding exceptions
12
+
13
+ 2.12.0 -rc1 (12 -Oct-2020 )
8
14
9
15
#43 : Add option to resolve type from multiple existing properties,
10
16
`@JsonTypeInfo(use=DEDUCTION)`
@@ -65,7 +71,6 @@ Project: jackson-databind
65
71
(reported by mjustin@github)
66
72
#2800 : Extract getter/setter/field name mangling from `BeanUtil` into
67
73
pluggable `AccessorNamingStrategy`
68
- #2805 : Remove `JsonProcessingException` from `ObjectMapper.treeToValue()`
69
74
#2873 : `MapperFeature.ACCEPT_CASE_INSENSITIVE_ENUMS` should work for enum as keys
70
75
(fix contributed by Ilya G)
71
76
- Add `BeanDeserializerBase.isCaseInsensitive()`
Original file line number Diff line number Diff line change @@ -3206,11 +3206,17 @@ public JsonParser treeAsTokens(TreeNode n) {
3206
3206
*<pre>
3207
3207
* objectMapper.convertValue(n, valueClass);
3208
3208
*</pre>
3209
+ *<p>
3210
+ * Note: erroneously includes {@code throws JsonProcessingException} even
3211
+ * though this exception is never thrown, only {@link IllegalArgumentException}
3212
+ * is thrown. But since changing exception part of method signature is
3213
+ * source-incompatible change, needs to be retained until 3.0.
3209
3214
*/
3210
3215
@ SuppressWarnings ("unchecked" )
3211
3216
@ Override
3212
3217
public <T > T treeToValue (TreeNode n , Class <T > valueType )
3213
- throws IllegalArgumentException
3218
+ throws IllegalArgumentException ,
3219
+ JsonProcessingException // is NOT actually thrown but retained as per #2878
3214
3220
{
3215
3221
if (n == null ) {
3216
3222
return null ;
Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ public void testBufferedLongViaCoercion() throws Exception {
316
316
assertEquals (Long .valueOf (EXP ), obj .longObj );
317
317
}
318
318
319
- public void testConversionsOfNull ()
319
+ public void testConversionsOfNull () throws Exception
320
320
{
321
321
// First: `null` value should become `NullNode`
322
322
JsonNode n = MAPPER .valueToTree (null );
You can’t perform that action at this time.
0 commit comments