Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package jackson-databind for
openSUSE:Factory checked in at 2021-01-26 14:46:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/jackson-databind (Old)
and /work/SRC/openSUSE:Factory/.jackson-databind.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "jackson-databind"
Tue Jan 26 14:46:38 2021 rev:5 rq:866653 version:2.10.5.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/jackson-databind/jackson-databind.changes
2020-03-26 23:33:16.502775059 +0100
+++
/work/SRC/openSUSE:Factory/.jackson-databind.new.28504/jackson-databind.changes
2021-01-26 14:50:05.823706011 +0100
@@ -1,0 +2,14 @@
+Mon Jan 25 08:07:41 UTC 2021 - Fridrich Strba <[email protected]>
+
+- Update to 2.10.5.1
+ * #2589: `DOMDeserializer`: setExpandEntityReferences(false) may
+ not prevent external entity expansion in all cases
+ (CVE-2020-25649, bsc#1177616)
+ * #2787 (partial fix): NPE after add mixin for enum
+ * #2679: 'ObjectMapper.readValue("123", Void.TYPE)' throws
+ "should never occur"
+- Vulnerabilities not affecting this version:
+ * CVE-2020-35728, bsc#1180391
+ * CVE-2021-20190, bsc#1181118
+
+-------------------------------------------------------------------
Old:
----
jackson-databind-2.10.3.tar.gz
New:
----
jackson-databind-2.10.5.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ jackson-databind.spec ++++++
--- /var/tmp/diff_new_pack.uisJ27/_old 2021-01-26 14:50:06.383706774 +0100
+++ /var/tmp/diff_new_pack.uisJ27/_new 2021-01-26 14:50:06.387706779 +0100
@@ -1,7 +1,7 @@
#
# spec file for package jackson-databind
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: jackson-databind
-Version: 2.10.3
+Version: 2.10.5.1
Release: 0
Summary: General data-binding package for Jackson (2.x)
License: Apache-2.0 AND LGPL-2.1-or-later
@@ -25,9 +25,9 @@
Source0:
https://github.com/FasterXML/jackson-databind/archive/%{name}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: maven-local
-BuildRequires: mvn(com.fasterxml.jackson.core:jackson-annotations) >=
%{version}
-BuildRequires: mvn(com.fasterxml.jackson.core:jackson-core) >= %{version}
-BuildRequires: mvn(com.fasterxml.jackson:jackson-base:pom:) >= %{version}
+BuildRequires: mvn(com.fasterxml.jackson.core:jackson-annotations)
+BuildRequires: mvn(com.fasterxml.jackson.core:jackson-core)
+BuildRequires: mvn(com.fasterxml.jackson:jackson-base:pom:)
BuildRequires: mvn(com.google.code.maven-replacer-plugin:replacer)
BuildRequires: mvn(org.apache.bcel:bcel)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
++++++ jackson-databind-2.10.3.tar.gz -> jackson-databind-2.10.5.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jackson-databind-jackson-databind-2.10.3/.travis.yml
new/jackson-databind-jackson-databind-2.10.5.1/.travis.yml
--- old/jackson-databind-jackson-databind-2.10.3/.travis.yml 2020-03-03
04:14:56.000000000 +0100
+++ new/jackson-databind-jackson-databind-2.10.5.1/.travis.yml 2020-12-02
04:44:24.000000000 +0100
@@ -8,7 +8,7 @@
# and since 2.10, will require jdk8 for build
jdk:
- openjdk8
- - oraclejdk11
+ - openjdk11
# 2019-11-26, tatu: Let's try caching Maven dependencies
cache:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jackson-databind-jackson-databind-2.10.3/SECURITY.md
new/jackson-databind-jackson-databind-2.10.5.1/SECURITY.md
--- old/jackson-databind-jackson-databind-2.10.3/SECURITY.md 1970-01-01
01:00:00.000000000 +0100
+++ new/jackson-databind-jackson-databind-2.10.5.1/SECURITY.md 2020-12-02
04:44:24.000000000 +0100
@@ -0,0 +1,22 @@
+# Security Policy
+
+Last Updated: 2019-11-26
+
+## Supported Versions
+
+Current status of open branches, with new releases, can be found from [Jackson
Releases](https://github.com/FasterXML/jackson/wiki/Jackson-Releases)
+wiki page
+
+## Reporting a Vulnerability
+
+The recommended mechanism for reporting possible security vulnerabilities
follows
+so-called "Coordinated Disclosure Plan" (see [definition of
DCP](https://vuls.cert.org/confluence/display/Wiki/Coordinated+Vulnerability+Disclosure+Guidance)
+for general idea). The first step is to file a [Tidelift security
contact](https://tidelift.com/security):
+Tidelift will route all reports via their system to maintainers of relevant
package(s), and start the
+process that will evaluate concern and issue possible fixes, send update
notices and so on.
+Note that you do not need to be a Tidelift subscriber to file a security
contact.
+
+Alternatively you may also report possible vulnerabilities to `info` at
fasterxml dot com
+mailing address. Note that filing an issue to go with report is fine, but if
you do that please
+DO NOT include details of security problem in the issue but only in email
contact.
+This is important to give us time to provide a patch, if necessary, for the
problem.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jackson-databind-jackson-databind-2.10.3/pom.xml
new/jackson-databind-jackson-databind-2.10.5.1/pom.xml
--- old/jackson-databind-jackson-databind-2.10.3/pom.xml 2020-03-03
04:14:56.000000000 +0100
+++ new/jackson-databind-jackson-databind-2.10.5.1/pom.xml 2020-12-02
04:44:24.000000000 +0100
@@ -5,12 +5,12 @@
<parent>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-base</artifactId>
- <version>2.10.3</version>
+ <version>2.10.5.20201202</version>
</parent>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
- <version>2.10.3</version>
+ <version>2.10.5.1</version>
<name>jackson-databind</name>
<packaging>bundle</packaging>
<description>General data-binding functionality for Jackson: works on core
streaming API</description>
@@ -21,7 +21,7 @@
<connection>scm:git:[email protected]:FasterXML/jackson-databind.git</connection>
<developerConnection>scm:git:[email protected]:FasterXML/jackson-databind.git</developerConnection>
<url>http://github.com/FasterXML/jackson-databind</url>
- <tag>jackson-databind-2.10.3</tag>
+ <tag>jackson-databind-2.10.5.1</tag>
</scm>
<properties>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/release-notes/CREDITS-2.x
new/jackson-databind-jackson-databind-2.10.5.1/release-notes/CREDITS-2.x
--- old/jackson-databind-jackson-databind-2.10.3/release-notes/CREDITS-2.x
2020-03-03 04:14:56.000000000 +0100
+++ new/jackson-databind-jackson-databind-2.10.5.1/release-notes/CREDITS-2.x
2020-12-02 04:44:24.000000000 +0100
@@ -1045,3 +1045,10 @@
* Reported, suggested fix for #2610: `EXTERNAL_PROPERTY` doesn't work with
`@JsonIgnoreProperties`
(2.10.3)
+Endre St??lsvik (stolsvik@github)
+ * Reported #2679: `ObjectMapper.readValue("123", Void.TYPE)` throws "should
never occur"
+ (2.10.4)
+
+Denis Kostousov (kostousov-ds@github)
+ * Reported #2787 (partial fix): NPE after add mixin for enum
+ (2.10.5)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/release-notes/VERSION-2.x
new/jackson-databind-jackson-databind-2.10.5.1/release-notes/VERSION-2.x
--- old/jackson-databind-jackson-databind-2.10.3/release-notes/VERSION-2.x
2020-03-03 04:14:56.000000000 +0100
+++ new/jackson-databind-jackson-databind-2.10.5.1/release-notes/VERSION-2.x
2020-12-02 04:44:24.000000000 +0100
@@ -4,6 +4,22 @@
=== Releases ===
------------------------------------------------------------------------
+2.10.5.1 (02-Dec-2020)
+
+#2589: `DOMDeserializer`: setExpandEntityReferences(false) may not prevent
+ external entity expansion in all cases (CVE-2020-25649)
+ (reported by Bartosz B)
+
+2.10.5 (21-Jul-2020)
+
+#2787 (partial fix): NPE after add mixin for enum
+ (reported by Denis K)
+
+2.10.4 (03-May-2020)
+
+#2679: `ObjectMapper.readValue("123", Void.TYPE)` throws "should never occur"
+ (reported by Endre S)
+
2.10.3 (03-Mar-2020)
#2482: `JSONMappingException` `Location` column number is one line Behind the
actual
@@ -24,26 +40,6 @@
#2101: `FAIL_ON_NULL_FOR_PRIMITIVES` failure does not indicate field name in
exception message
(reported by raderio@github)
-#2544: java.lang.NoClassDefFoundError Thrown for compact profile1
- (reported by Jon A)
-#2553: JsonDeserialize(contentAs=...) broken with raw collections
- (reported by cpopp@github)
-#2556: Contention in `TypeNameIdResolver.idFromClass()`
- (reported by Fabian L)
-#2560: Check `WRAP_EXCEPTIONS` in `CollectionDeserializer.handleNonArray()`
- (reported by Stefan W)
-#2564: Fix `IllegalArgumentException` on empty input collection for
`ArrayBlockingQueue`
- (reported, fix suggested by yamert89@github)
-#2566: `MissingNode.toString()` returns `null` (4 character token) instead of
empty string
- (reported by Greg A)
-#2567: Incorrect target type for arrays when providing nulls and nulls are
disabled
- (reported by Jo??o G)
-#2573: Problem with `JsonInclude` config overrides for `java.util.Map`
- (reported by SukruthKS@github)
-#2576: Fail to serialize `Enum` instance which includes a method override
- as POJO (shape = Shape.OBJECT)
- (reported by ylhuang-veeva@github)
-- Fix an issue with `ObjectReader.with(JsonParser.Feature)` (and related) not
working
2.10.1 (09-Nov-2019)
@@ -123,7 +119,7 @@
#2241: Add `PropertyNamingStrategy.LOWER_DOT_CASE` for dot-delimited names
(contributed by [email protected])
#2251: Getter that returns an abstract collection breaks a delegating
`@JsonCreator`
-#2265: Inconsistent handling of Collections$UnmodifiableList vs
Collections$UnmodifiableRandomAccessListq
+#2265: Inconsistent handling of Collections$UnmodifiableList vs
Collections$UnmodifiableRandomAccessList
#2273: Add basic Java 9+ module info
#2280: JsonMerge not work with constructor args
(reported by Deblock T)
@@ -182,29 +178,7 @@
deserialize as "null value"
(contributed by Martin C)
-2.9.10.4 (not yet released)
-
-#2631: Block one more gadget type (shaded-hikari-config, CVE-to-be-allocated)
- (reported by threedr3am & LFY)
-#2634: Block two more gadget types (ibatis-sqlmap, anteros-core;
CVE-to-be-allocated)
- (reported by threedr3am & V1ZkRA)
-
-2.9.10.3 (23-Feb-2020)
-
-#2620: Block one more gadget type (xbean-reflect/JNDI - CVE-2020-8840)
- (reported by threedr3am@github)
-
-2.9.10.2 (03-Jan-2020)
-
-#2526: Block two more gadget types (ehcache/JNDI - CVE-2019-20330)
- (repoerted by UltramanGaia)
-
-2.9.10.1 (20-Oct-2019)
-
-#2478: Block two more gadget types (commons-dbcp, p6spy,
- CVE-2019-16942 / CVE-2019-16943)
- (reported by b5mali4 / [email protected])
-#2498: Block one more gadget type (log4j-extras/1.2, CVE-2019-17531)
+[2.9.10.x micro-patches omitted]
2.9.10 (21-Sep-2019)
@@ -218,15 +192,15 @@
#2404: FAIL_ON_MISSING_EXTERNAL_TYPE_ID_PROPERTY setting ignored when
creator properties are buffered
(contributed by Joe B)
-#2410: Block one more gadget type (CVE-2019-14540)
+#2410: Block one more gadget type (HikariCP, CVE-2019-14540)
(reported by iSafeBlue@github / [email protected])
-#2420: Block one more gadget type (no CVE allocated yet)
+#2420: Block one more gadget type (cxf-jax-rs, no CVE allocated yet)
(reported by [email protected])
-#2449: Block one more gadget type (CVE-2019-14540)
+#2449: Block one more gadget type (HikariCP, CVE-2019-14439 / CVE-2019-16335)
(reported by kingkk)
#2460: Block one more gadget type (ehcache, CVE-2019-17267)
(reported by Fei Lu)
-#2462: Block two more gadget types (commons-configuration)
+#2462: Block two more gadget types (commons-configuration/-2)
#2469: Block one more gadget type (xalan2)
2.9.9 (16-May-2019)
@@ -378,7 +352,7 @@
(reported by Alexander S)
#1854: NPE deserializing collection with `@JsonCreator` and
`ACCEPT_CASE_INSENSITIVE_PROPERTIES`
(reported by rue-jw@github)
-#1855: Blacklist for more serialization gadgets (dbcp/tomcat, spring)
+#1855: Blacklist for more serialization gadgets (dbcp/tomcat, spring,
CVE-2017-17485)
#1859: Issue handling unknown/unmapped Enum keys
(reported by remya11@github)
#1868: Class name handling for JDK unmodifiable Collection types changed
@@ -589,9 +563,9 @@
#1872: `NullPointerException` in `SubTypeValidator.validateSubType` when
validating Spring interface
(reported by Rob W)
-#1899: Another two gadgets to exploit default typing issue in jackson-databind
+#1899: Another two gadgets to exploit default typing issue (CVE-2018-5968)
(reported by OneSourceCat@github)
-#1931: Two more `c3p0` gadgets to exploit default typing issue
+#1931: Two more `c3p0` gadgets to exploit default typing issue (c3p0,
CVE-2018-7489)
2.8.11 (24-Dec-2017)
@@ -605,7 +579,7 @@
(reported by henryptung@github)
#1807: Jackson-databind caches plain map deserializer and use it even map has
`@JsonDeserializer`
(reported by lexas2509@github)
-#1855: Blacklist for more serialization gadgets (dbcp/tomcat, spring)
+#1855: Blacklist for more serialization gadgets (dbcp/tomcat, spring /
CVE-2017-17485)
2.8.10 (24-Aug-2017)
@@ -621,7 +595,7 @@
binary formats (CBOR, Smile)
#1735: Missing type checks when using polymorphic type ids
(reported by Lukas Euler)
-#1737: Block more JDK types from polymorphic deserialization
+#1737: Block more JDK types from polymorphic deserialization (CVE 2017-15095)
2.8.9 (12-Jun-2017)
@@ -646,7 +620,7 @@
#1585: Invoke ServiceLoader.load() inside of a privileged block when loading
modules using `ObjectMapper.findModules()`
(contributed by Ivo S)
-#1599: Jackson Deserializer security vulnerability
+#1599: Jackson Deserializer security vulnerability (CVE-2017-7525)
(reported by ayound@github)
#1607: @JsonIdentityReference not used when setup on class only
(reported by vboulaye@github)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/AbstractTypeResolver.java
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/AbstractTypeResolver.java
---
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/AbstractTypeResolver.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/AbstractTypeResolver.java
2020-12-02 04:44:24.000000000 +0100
@@ -1,6 +1,5 @@
package com.fasterxml.jackson.databind;
-
/**
* Defines interface for resolvers that can resolve abstract types into
concrete
* ones; either by using static mappings, or possibly by materializing
@@ -22,9 +21,11 @@
* of bindings; that is, it is legal to return type that could be further
* resolved: caller is expected to keep calling this method on registered
* resolvers, until a concrete type is located.
- *
- * @param config Configuration in use; should always be of type
- * {@code DeserializationConfig}
+ *
+ * @param config Configuration in use
+ * @param type Type to find mapping for
+ *
+ * @return Type to map given input type (if mapping found) or {@code null}
(if not).
*/
public JavaType findTypeMapping(DeserializationConfig config, JavaType
type) {
return null;
@@ -35,6 +36,11 @@
* obsoleted in 2.7
*
* @deprecated since 2.8 (may be removed from 2.9 or later)
+ *
+ * @param config Configuration in use
+ * @param type Type to resolve
+ *
+ * @return Resolved concrete type
*/
@Deprecated
public JavaType resolveAbstractType(DeserializationConfig config,
@@ -49,8 +55,7 @@
* It will be called after checking all other possibilities,
* including defaulting.
*
- * @param config Configuration in use; should always be of type
- * <code>DeserializationConfig</code>
+ * @param config Configuration in use
* @param typeDesc Description of the POJO type to resolve
*
* @return Resolved concrete type (which should retain generic
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/AnnotationIntrospector.java
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/AnnotationIntrospector.java
---
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/AnnotationIntrospector.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/AnnotationIntrospector.java
2020-12-02 04:44:24.000000000 +0100
@@ -631,7 +631,7 @@
/**
* Method for getting a serializer definition on specified method
* or field. Type of definition is either instance (of type {@link
JsonSerializer})
- * or Class (of {@code Class<JsonSerializer} implementation subtype);
+ * or Class (of {@code Class<JsonSerializer>} implementation subtype);
* if value of different type is returned, a runtime exception may be
thrown by caller.
*/
public Object findSerializer(Annotated am) {
@@ -641,7 +641,7 @@
/**
* Method for getting a serializer definition for keys of associated
{@code java.util.Map} property.
* Type of definition is either instance (of type {@link JsonSerializer})
- * or Class (of type {@code Class<JsonSerializer>});
+ * or Class (of type {@code Class<JsonSerializer>});
* if value of different type is returned, a runtime exception may be
thrown by caller.
*/
public Object findKeySerializer(Annotated am) {
@@ -652,7 +652,7 @@
* Method for getting a serializer definition for content (values) of
* associated <code>Collection</code>, <code>array</code> or {@code Map}
property.
* Type of definition is either instance (of type {@link JsonSerializer})
- * or Class (of type {@code Class<JsonSerializer>});
+ * or Class (of type {@code Class<JsonSerializer>});
* if value of different
* type is returned, a runtime exception may be thrown by caller.
*/
@@ -992,7 +992,7 @@
* Method for getting a deserializer definition on specified method
* or field.
* Type of definition is either instance (of type {@link JsonDeserializer})
- * or Class (of type {@code Class<JsonDeserializer>});
+ * or Class (of type {@code Class&<JsonDeserializer>});
* type is returned, a runtime exception may be thrown by caller.
*/
public Object findDeserializer(Annotated am) {
@@ -1003,7 +1003,7 @@
* Method for getting a deserializer definition for keys of
* associated <code>Map</code> property.
* Type of definition is either instance (of type {@link JsonDeserializer})
- * or Class (of type {@code Class<JsonDeserializer>});
+ * or Class (of type {@code Class<JsonDeserializer>});
* if value of different
* type is returned, a runtime exception may be thrown by caller.
*/
@@ -1016,7 +1016,7 @@
* associated <code>Collection</code>, <code>array</code> or
* <code>Map</code> property.
* Type of definition is either instance (of type {@link JsonDeserializer})
- * or Class (of type {@code Class<JsonDeserializer>});
+ * or Class (of type {@code Class<JsonDeserializer>});
* if value of different
* type is returned, a runtime exception may be thrown by caller.
*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/DeserializationFeature.java
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/DeserializationFeature.java
---
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/DeserializationFeature.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/DeserializationFeature.java
2020-12-02 04:44:24.000000000 +0100
@@ -90,9 +90,9 @@
/**
* Feature that determines whether JSON Array is mapped to
- * <code>Object[]</code> or <code>List<Object></code> when binding
+ * <code>Object[]</code> or {@code List<Object>} when binding
* "untyped" objects (ones with nominal type of
<code>java.lang.Object</code>).
- * If true, binds as <code>Object[]</code>; if false, as
<code>List<Object></code>.
+ * If true, binds as <code>Object[]</code>; if false, as {@code
List<Object>}.
*<p>
* Feature is disabled by default, meaning that JSON arrays are bound as
* {@link java.util.List}s.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java
---
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java
2020-12-02 04:44:24.000000000 +0100
@@ -1808,7 +1808,7 @@
* Accessor for getting a mutable configuration override object for
* given type, needed to add or change per-type overrides applied
* to properties of given type.
- * Usage is through returned object by colling "setter" methods, which
+ * Usage is through returned object by calling "setter" methods, which
* directly modify override object and take effect directly.
* For example you can do
*<pre>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBase.java
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBase.java
---
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBase.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBase.java
2020-12-02 04:44:24.000000000 +0100
@@ -212,9 +212,14 @@
_injectables = (injectables == null || injectables.isEmpty()) ? null
: injectables.toArray(new ValueInjector[injectables.size()]);
_objectIdReader = builder.getObjectIdReader();
+
+ // 02-May-2020, tatu (from @vjkoskela's comment): [databind#2486] is
due to
+ // determination that existence of array-delegate alone means that
use of
+ // "default creator + POJO" -- is not available. But this is not
actually
+ // known before seeing Array value (unlike with more general "any"
delegate).
_nonStandardCreation = (_unwrappedPropertyHandler != null)
|| _valueInstantiator.canCreateUsingDelegate()
- || _valueInstantiator.canCreateUsingArrayDelegate() // new in 2.7
+ || _valueInstantiator.canCreateUsingArrayDelegate()
|| _valueInstantiator.canCreateFromObjectWith()
|| !_valueInstantiator.canCreateUsingDefault()
;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.java
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.java
---
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.java
2020-12-02 04:44:24.000000000 +0100
@@ -203,13 +203,12 @@
/**
* Deprecated variant of
- * {@link #handleUnexpectedToken(DeserializationContext, JavaType,
JsonToken, JsonParser, String)
+ * {@link #handleUnexpectedToken(DeserializationContext, JavaType,
JsonToken, JsonParser, String)}
*
* @since 2.8
*
* @deprecated Since 2.10
*/
- @SuppressWarnings("javadoc")
@Deprecated
public Object handleUnexpectedToken(DeserializationContext ctxt,
Class<?> targetType, JsonToken t, JsonParser p,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/deser/std/EnumMapDeserializer.java
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/deser/std/EnumMapDeserializer.java
---
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/deser/std/EnumMapDeserializer.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/deser/std/EnumMapDeserializer.java
2020-12-02 04:44:24.000000000 +0100
@@ -19,7 +19,7 @@
* Deserializer for {@link EnumMap} values.
* <p>
* Note: casting within this class is all messed up -- just could not figure
out a way
- * to properly deal with recursive definition of "EnumMap<K extends
Enum<K>, V>
+ * to properly deal with recursive definition of {@code EnumMap<K extends
Enum<K>, V>}
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
public class EnumMapDeserializer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/deser/std/NumberDeserializers.java
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/deser/std/NumberDeserializers.java
---
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/deser/std/NumberDeserializers.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/deser/std/NumberDeserializers.java
2020-12-02 04:44:24.000000000 +0100
@@ -67,6 +67,11 @@
if (rawType == Float.TYPE) {
return FloatDeserializer.primitiveInstance;
}
+ // [databind#2679]: bit odd place for this (Void.class handled in
+ // `JdkDeserializers`), due to `void` being primitive type
+ if (rawType == Void.TYPE) {
+ return NullifyingDeserializer.instance;
+ }
} else if (_classNames.contains(clsName)) {
// Start with most common types; int, boolean, long, double
if (rawType == Integer.class) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/ext/DOMDeserializer.java
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/ext/DOMDeserializer.java
---
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/ext/DOMDeserializer.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/ext/DOMDeserializer.java
2020-12-02 04:44:24.000000000 +0100
@@ -39,6 +39,14 @@
// 14-Jul-2016, tatu: Not sure how or why, but during code
coverage runs
// (via Cobertura) we get `java.lang.AbstractMethodError` so...
ignore that too
}
+
+ // [databind#2589] add two more settings just in case
+ try {
+
parserFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl",
true);
+ } catch (Throwable t) { } // as per previous one, nothing much to do
+ try {
+
parserFactory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd",
false);
+ } catch (Throwable t) { } // as per previous one, nothing much to do
DEFAULT_PARSER_FACTORY = parserFactory;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/introspect/AnnotatedFieldCollector.java
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/introspect/AnnotatedFieldCollector.java
---
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/introspect/AnnotatedFieldCollector.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/introspect/AnnotatedFieldCollector.java
2020-12-02 04:44:24.000000000 +0100
@@ -81,7 +81,7 @@
fields.put(f.getName(), b);
}
// And then... any mix-in overrides?
- if (_mixInResolver != null) {
+ if ((fields != null) && (_mixInResolver != null)) {
Class<?> mixin = _mixInResolver.findMixInClassFor(cls);
if (mixin != null) {
_addFieldMixIns(mixin, cls, fields);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java
---
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java
2020-12-02 04:44:24.000000000 +0100
@@ -49,6 +49,9 @@
// [databind#1737]; 3rd party
//s.add("org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor");
// deprecated by [databind#1855]
s.add("org.springframework.beans.factory.config.PropertyPathFactoryBean");
+ // [databind#2680]
+ s.add("org.springframework.aop.config.MethodLocatingFactoryBean");
+
s.add("org.springframework.beans.factory.config.BeanReferenceFactoryBean");
// s.add("com.mchange.v2.c3p0.JndiRefForwardingDataSource"); // deprecated by
[databind#1931]
// s.add("com.mchange.v2.c3p0.WrapperConnectionPoolDataSource"); // - "" -
@@ -74,10 +77,11 @@
s.add("com.sun.deploy.security.ruleset.DRSHelper");
s.add("org.apache.axis2.jaxws.spi.handler.HandlerResolverImpl");
- // [databind#2186]: yet more 3rd party gadgets
+ // [databind#2186], [databind#2670]: yet more 3rd party gadgets
s.add("org.jboss.util.propertyeditor.DocumentEditor");
s.add("org.apache.openjpa.ee.RegistryManagedRuntime");
s.add("org.apache.openjpa.ee.JNDIManagedRuntime");
+ s.add("org.apache.openjpa.ee.WASRegistryManagedRuntime"); // [#2670]
addition
s.add("org.apache.axis2.transport.jms.JMSOutTransportInfo");
// [databind#2326] (2.9.9)
@@ -109,8 +113,10 @@
s.add("org.apache.commons.configuration.JNDIConfiguration");
s.add("org.apache.commons.configuration2.JNDIConfiguration");
- // [databind#2469]: xalan2
+ // [databind#2469]: xalan
s.add("org.apache.xalan.lib.sql.JNDIConnectionPool");
+ // [databind#2704]: xalan2
+ s.add("com.sun.org.apache.xalan.internal.lib.sql.JNDIConnectionPool");
// [databind#2478]: comons-dbcp, p6spy
s.add("org.apache.commons.dbcp.datasources.PerUserPoolDataSource");
@@ -131,9 +137,75 @@
// [databind#2631]: shaded hikari-config
s.add("org.apache.hadoop.shaded.com.zaxxer.hikari.HikariConfig");
- // [databind#2634]: ibatis-sqlmap, anteros-core
+ // [databind#2634]: ibatis-sqlmap, anteros-core/-dbcp
s.add("com.ibatis.sqlmap.engine.transaction.jta.JtaTransactionConfig");
s.add("br.com.anteros.dbcp.AnterosDBCPConfig");
+ // [databind#2814]: anteros-dbcp
+ s.add("br.com.anteros.dbcp.AnterosDBCPDataSource");
+
+ // [databind#2642][databind#2854]: javax.swing (jdk)
+ s.add("javax.swing.JEditorPane");
+ s.add("javax.swing.JTextPane");
+
+ // [databind#2648], [databind#2653]: shire-core
+ s.add("org.apache.shiro.realm.jndi.JndiRealmFactory");
+ s.add("org.apache.shiro.jndi.JndiObjectFactory");
+
+ // [databind#2658]: ignite-jta (, quartz-core)
+ s.add("org.apache.ignite.cache.jta.jndi.CacheJndiTmLookup");
+ s.add("org.apache.ignite.cache.jta.jndi.CacheJndiTmFactory");
+ s.add("org.quartz.utils.JNDIConnectionProvider");
+
+ // [databind#2659]: aries.transaction.jms
+
s.add("org.apache.aries.transaction.jms.internal.XaPooledConnectionFactory");
+
s.add("org.apache.aries.transaction.jms.RecoverablePooledConnectionFactory");
+
+ // [databind#2660]: caucho-quercus
+ s.add("com.caucho.config.types.ResourceRef");
+
+ // [databind#2662]: aoju/bus-proxy
+ s.add("org.aoju.bus.proxy.provider.RmiProvider");
+ s.add("org.aoju.bus.proxy.provider.remoting.RmiProvider");
+
+ // [databind#2664]: activemq-core, activemq-pool, activemq-pool-jms
+
+ s.add("org.apache.activemq.ActiveMQConnectionFactory"); // core
+ s.add("org.apache.activemq.ActiveMQXAConnectionFactory");
+ s.add("org.apache.activemq.spring.ActiveMQConnectionFactory");
+ s.add("org.apache.activemq.spring.ActiveMQXAConnectionFactory");
+ s.add("org.apache.activemq.pool.JcaPooledConnectionFactory"); // pool
+ s.add("org.apache.activemq.pool.PooledConnectionFactory");
+ s.add("org.apache.activemq.pool.XaPooledConnectionFactory");
+ s.add("org.apache.activemq.jms.pool.XaPooledConnectionFactory"); //
pool-jms
+ s.add("org.apache.activemq.jms.pool.JcaPooledConnectionFactory");
+
+ // [databind#2666]: apache/commons-jms
+ s.add("org.apache.commons.proxy.provider.remoting.RmiProvider");
+
+ // [databind#2682]: commons-jelly
+ s.add("org.apache.commons.jelly.impl.Embedded");
+
+ // [databind#2688]: apache/drill
+ s.add("oadd.org.apache.xalan.lib.sql.JNDIConnectionPool");
+
+ // [databind#2698]: weblogic w/ oracle/aq-jms
+ // (note: dependency not available via Maven Central, but as part of
+ // weblogic installation, possibly fairly old version(s))
+ s.add("oracle.jms.AQjmsQueueConnectionFactory");
+ s.add("oracle.jms.AQjmsXATopicConnectionFactory");
+ s.add("oracle.jms.AQjmsTopicConnectionFactory");
+ s.add("oracle.jms.AQjmsXAQueueConnectionFactory");
+ s.add("oracle.jms.AQjmsXAConnectionFactory");
+
+ // [databind#2764]: org.jsecurity:
+ s.add("org.jsecurity.realm.jndi.JndiRealmFactory");
+
+ // [databind#2798]: com.pastdev.httpcomponents:
+ s.add("com.pastdev.httpcomponents.configuration.JndiConfiguration");
+
+ // [databind#2826], [databind#2827]
+ s.add("com.nqadmin.rowset.JdbcRowSetImpl");
+ s.add("org.arrah.framework.rdbms.UpdatableJdbcRowsetImpl");
DEFAULT_NO_DESER_CLASS_NAMES = Collections.unmodifiableSet(s);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java
---
old/jackson-databind-jackson-databind-2.10.3/src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java
2020-12-02 04:44:24.000000000 +0100
@@ -980,7 +980,7 @@
/**
* Factory method for constructing {@link JavaType} that
* represents a parameterized type. For example, to represent
- * type {@code List<Set<Integer>>}, you could call
+ * type {@code List<Set<Integer>>}, you could
*<pre>
* JavaType inner = TypeFactory.constructParametricType(Set.class,
Set.class, Integer.class);
* return TypeFactory.constructParametricType(ArrayList.class,
List.class, inner);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/databind/ObjectReaderTest.java
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/databind/ObjectReaderTest.java
---
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/databind/ObjectReaderTest.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/databind/ObjectReaderTest.java
2020-12-02 04:44:24.000000000 +0100
@@ -50,7 +50,7 @@
assertEquals(1, ((List<?>) ob).size());
}
- public void testParserFeatures() throws Exception
+ public void testParserFeaturesComments() throws Exception
{
final String JSON = "[ /* foo */ 7 ]";
// default won't accept comments, let's change that:
@@ -71,6 +71,36 @@
}
}
+ public void testParserFeaturesCtrlChars() throws Exception
+ {
+ String FIELD = "a\tb";
+ String VALUE = "\t";
+ String JSON = "{ "+quote(FIELD)+" : "+quote(VALUE)+"}";
+ Map<?, ?> result;
+
+ // First: by default, unescaped control characters should not work
+ try {
+ result = MAPPER.readValue(JSON, Map.class);
+ fail("Should not pass with defaylt settings");
+ } catch (JsonParseException e) {
+ verifyException(e, "Illegal unquoted character");
+ }
+
+ // But both ObjectReader:
+ result = MAPPER.readerFor(Map.class)
+ .with(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS)
+ .readValue(JSON);
+ assertEquals(1, result.size());
+
+ // and new mapper should work
+ ObjectMapper mapper2 = JsonMapper.builder()
+ .enable(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS)
+ .build();
+ result = mapper2.readerFor(Map.class)
+ .readValue(JSON);
+ assertEquals(1, result.size());
+ }
+
public void testNodeHandling() throws Exception
{
JsonNodeFactory nodes = new JsonNodeFactory(true);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/databind/deser/PropertyAliasTest.java
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/databind/deser/PropertyAliasTest.java
---
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/databind/deser/PropertyAliasTest.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/databind/deser/PropertyAliasTest.java
2020-12-02 04:44:24.000000000 +0100
@@ -6,7 +6,9 @@
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.BaseMapTest;
+import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.json.JsonMapper;
public class PropertyAliasTest extends BaseMapTest
{
@@ -58,6 +60,26 @@
public PolyWrapperForAlias(Object v) { value = v; }
}
+ // [databind#2669]
+ static class Pojo2669 {
+ @JsonAlias({"nick", "name"})
+ private String name;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+ }
+
+ /*
+ /**********************************************************************
+ /* Test methods
+ /**********************************************************************
+ */
+
private final ObjectMapper MAPPER = newJsonMapper();
// [databind#1029]
@@ -107,4 +129,17 @@
assertEquals("a", bean.partitionId);
assertEquals("123", bean._id);
}
+
+ // [databind#2669]
+ public void testCaseInsensitiveAliases() throws Exception {
+
+ ObjectMapper mapper = JsonMapper.builder()
+ .enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES)
+ .build();
+
+ String text = "{\"name\":\"test\"}";
+ Pojo2669 pojo = mapper.readValue(text, Pojo2669.class);
+ assertNotNull(pojo);
+ assertEquals("test", pojo.getName());
+ }
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/databind/deser/TestConcurrency.java
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/databind/deser/TestConcurrency.java
---
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/databind/deser/TestConcurrency.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/databind/deser/TestConcurrency.java
2020-12-02 04:44:24.000000000 +0100
@@ -8,7 +8,7 @@
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
/**
- * Testing for [JACKSON-237] (NPE due to race condition)
+ * Testing for NPE due to race condition.
*/
public class TestConcurrency extends BaseMapTest
{
@@ -18,7 +18,7 @@
/**********************************************
*/
- @JsonDeserialize(using=BeanDeserializer.class)
+ @JsonDeserialize(using=CustomBeanDeserializer.class)
static class Bean
{
public int value = 42;
@@ -34,7 +34,7 @@
* Dummy deserializer used for verifying that partially handled (i.e. not
yet
* resolved) deserializers are not allowed to be used.
*/
- static class BeanDeserializer
+ static class CustomBeanDeserializer
extends JsonDeserializer<Bean>
implements ResolvableDeserializer
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/databind/deser/jdk/DateDeserializationTZ1153Test.java
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/databind/deser/jdk/DateDeserializationTZ1153Test.java
---
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/databind/deser/jdk/DateDeserializationTZ1153Test.java
1970-01-01 01:00:00.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/databind/deser/jdk/DateDeserializationTZ1153Test.java
2020-12-02 04:44:24.000000000 +0100
@@ -0,0 +1,34 @@
+package com.fasterxml.jackson.databind.deser.jdk;
+
+import java.util.Date;
+import java.util.TimeZone;
+
+import com.fasterxml.jackson.databind.*;
+
+public class DateDeserializationTZ1153Test extends BaseMapTest
+{
+ private final ObjectMapper MAPPER = newJsonMapper();
+
+ // [databind#1153]
+ public void testWithTimezones1153() throws Exception
+ {
+ for (String tzStr : new String[] {
+ "UTC", "CET", "America/Los_Angeles", "Australia/Melbourne"
+ }) {
+ _testWithTimeZone(TimeZone.getTimeZone(tzStr));
+ }
+ }
+
+ void _testWithTimeZone(TimeZone tz) throws Exception
+ {
+ ObjectReader r = MAPPER.readerFor(Date.class)
+ .with(tz);
+
+ String time = "2016-01-01T17:00:00.000Z";
+ long correctTime = 1451667600000l;
+ Date dateAccordingToJackson = r.readValue(quote(time));
+
+ assertEquals("ISO8601 decoding mismatch " + tz,
+ correctTime, dateAccordingToJackson.getTime());
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/databind/deser/jdk/JDKScalarsTest.java
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/databind/deser/jdk/JDKScalarsTest.java
---
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/databind/deser/jdk/JDKScalarsTest.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/databind/deser/jdk/JDKScalarsTest.java
2020-12-02 04:44:24.000000000 +0100
@@ -857,14 +857,24 @@
}
}
- // [databind#2197]
+ // [databind#2197], [databind#2679]
public void testVoidDeser() throws Exception
{
+ // First, `Void` as bean property
VoidBean bean = MAPPER.readValue(aposToQuotes("{'value' : 123 }"),
VoidBean.class);
assertNull(bean.value);
+
+ // Then `Void` and `void` (Void.TYPE) as root values
+ assertNull(MAPPER.readValue("{}", Void.class));
+ assertNull(MAPPER.readValue("1234", Void.class));
+ assertNull(MAPPER.readValue("[ 1, true ]", Void.class));
+
+ assertNull(MAPPER.readValue("{}", Void.TYPE));
+ assertNull(MAPPER.readValue("1234", Void.TYPE));
+ assertNull(MAPPER.readValue("[ 1, true ]", Void.TYPE));
}
-
+
/*
/**********************************************************
/* Test for invalid String values
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/databind/deser/jdk/TestEmptyArrayBlockingQueueDeser.java
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/databind/deser/jdk/TestEmptyArrayBlockingQueueDeser.java
---
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/databind/deser/jdk/TestEmptyArrayBlockingQueueDeser.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/databind/deser/jdk/TestEmptyArrayBlockingQueueDeser.java
2020-12-02 04:44:24.000000000 +0100
@@ -3,7 +3,6 @@
import java.util.Collection;
import java.util.concurrent.ArrayBlockingQueue;
-import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.*;
public class TestEmptyArrayBlockingQueueDeser extends BaseMapTest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/databind/jsontype/GenericNestedType2331Test.java
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/databind/jsontype/GenericNestedType2331Test.java
---
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/databind/jsontype/GenericNestedType2331Test.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/databind/jsontype/GenericNestedType2331Test.java
2020-12-02 04:44:24.000000000 +0100
@@ -28,8 +28,9 @@
public List<? extends SuperNode<Node<T>>> getChildren() {
return children;
}
- }
-
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
public void testGeneric2331() throws Exception {
Node root = new Node();
root.children.add(new Node());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/failing/BuilderDeserializationTest2486.java
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/failing/BuilderDeserializationTest2486.java
---
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/failing/BuilderDeserializationTest2486.java
1970-01-01 01:00:00.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/failing/BuilderDeserializationTest2486.java
2020-12-02 04:44:24.000000000 +0100
@@ -0,0 +1,116 @@
+package com.fasterxml.jackson.failing;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.databind.BaseMapTest;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import java.util.List;
+
+public class BuilderDeserializationTest2486
+ extends BaseMapTest
+{
+ @JsonDeserialize(builder = MyPOJOWithArrayCreator.Builder.class)
+ public static class MyPOJOWithArrayCreator {
+ private final int index;
+
+ private MyPOJOWithArrayCreator(int i) {
+ index = i;
+ }
+
+ public int getIndex() {
+ return index;
+ }
+
+ public static class Builder {
+ private int index;
+
+ public Builder() {
+ // Default constructor
+ }
+
+ @JsonCreator(mode = JsonCreator.Mode.DELEGATING)
+ public Builder(final List<Object> jsonArray) {
+ withIndex((int) jsonArray.get(0));
+ }
+
+ public Builder withIndex(int i) {
+ index = i;
+ return this;
+ }
+
+ public MyPOJOWithArrayCreator build() {
+ return new MyPOJOWithArrayCreator(index);
+ }
+ }
+ }
+
+ @JsonDeserialize(builder = MyPOJOWithPrimitiveCreator.Builder.class)
+ public static class MyPOJOWithPrimitiveCreator {
+ private final int index;
+
+ private MyPOJOWithPrimitiveCreator(int i) {
+ index = i;
+ }
+
+ public int getIndex() {
+ return index;
+ }
+
+ public static class Builder {
+ private int index;
+
+ public Builder() {
+ // Default constructor
+ }
+
+ @JsonCreator(mode = JsonCreator.Mode.DELEGATING)
+ public Builder(final int i) {
+ withIndex(i);
+ }
+
+ public Builder withIndex(int i) {
+ index = i;
+ return this;
+ }
+
+ public MyPOJOWithPrimitiveCreator build() {
+ return new MyPOJOWithPrimitiveCreator(index);
+ }
+ }
+ }
+
+ private final ObjectMapper MAPPER = newJsonMapper();
+
+ // This test passes when the array based @JsonCreator is removed from the
+ // MyPOJOWithArrayCreator.Builder implementation. The presence of the
creator
+ // in the case of arrays breaks deserialize from an object.
+ //
+ // Compare that to the analogous tests for MyPOJOWithPrimitiveCreator which
+ // pass in both cases.
+ //
+ // I left some notes in BeanDeserializerBase as to behavior.
+ public void testPOJOWithArrayCreatorFromObjectRepresentation() throws
Exception {
+ final String json = aposToQuotes("{ 'index': 123 }");
+ final MyPOJOWithArrayCreator deserialized = MAPPER.readValue(json,
MyPOJOWithArrayCreator.class);
+ assertEquals(123, deserialized.getIndex());
+ }
+
+ public void testPOJOWithArrayCreatorFromArrayRepresentation() throws
Exception {
+ final String json = "[123]";
+ final MyPOJOWithArrayCreator deserialized = MAPPER.readValue(json,
MyPOJOWithArrayCreator.class);
+ assertEquals(123, deserialized.getIndex());
+ }
+
+ public void testPOJOWithPrimitiveCreatorFromObjectRepresentation() throws
Exception {
+ final String json = aposToQuotes("{ 'index': 123 }");
+ final MyPOJOWithPrimitiveCreator deserialized = MAPPER.readValue(json,
MyPOJOWithPrimitiveCreator.class);
+ assertEquals(123, deserialized.getIndex());
+ }
+
+ public void testPOJOWithPrimitiveCreatorFromPrimitiveRepresentation()
throws Exception {
+ final String json ="123";
+ final MyPOJOWithPrimitiveCreator deserialized = MAPPER.readValue(json,
MyPOJOWithPrimitiveCreator.class);
+ assertEquals(123, deserialized.getIndex());
+ }
+}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/failing/BuilderWithUnwrappedSingleArray2608Test.java
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/failing/BuilderWithUnwrappedSingleArray2608Test.java
---
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/failing/BuilderWithUnwrappedSingleArray2608Test.java
1970-01-01 01:00:00.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/failing/BuilderWithUnwrappedSingleArray2608Test.java
2020-12-02 04:44:24.000000000 +0100
@@ -0,0 +1,78 @@
+package com.fasterxml.jackson.failing;
+
+import com.fasterxml.jackson.databind.*;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
+import com.fasterxml.jackson.databind.json.JsonMapper;
+
+public class BuilderWithUnwrappedSingleArray2608Test extends BaseMapTest
+{
+ // [databind#2608]
+ @JsonDeserialize(builder = ExamplePOJO2608.ExamplePOJOBuilder.class)
+ static class ExamplePOJO2608 {
+ public int id;
+ public POJOValue2608 value;
+
+ public ExamplePOJO2608(int id, POJOValue2608 value) {
+ this.id = id;
+ this.value = value;
+ }
+
+ @JsonPOJOBuilder(withPrefix = "")
+ static class ExamplePOJOBuilder {
+ int id;
+ POJOValue2608 value;
+
+ public ExamplePOJOBuilder id(int i) {
+ this.id = i;
+ return this;
+ }
+
+ public ExamplePOJOBuilder value(POJOValue2608 v) {
+ this.value = v;
+ return this;
+ }
+
+ public ExamplePOJO2608 build() {
+ return new ExamplePOJO2608(id, value);
+ }
+ }
+ }
+
+ // [databind#2608]
+ @JsonDeserialize(builder = POJOValue2608.POJOValueBuilder.class)
+ static class POJOValue2608 {
+ public String subValue;
+
+ public POJOValue2608(String s) {
+ subValue = s;
+ }
+
+ @JsonPOJOBuilder(withPrefix = "")
+ public static class POJOValueBuilder {
+ String v;
+
+ public POJOValueBuilder subValue(String s) {
+ v = s;
+ return this;
+ }
+
+ public POJOValue2608 build() {
+ return new POJOValue2608(v);
+ }
+ }
+ }
+
+ // [databind#2608]
+ public void testDeserializationAndFail() throws Exception {
+ final ObjectMapper mapper = JsonMapper.builder()
+ .enable(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS)
+ .build();
+
+// Regular POJO would work:
+// final String serialized = "{\"id\": 1, \"value\": {\"subValue\":
\"123\"}}";
+ final String serialized = "{\"id\": 1, \"value\": [ {\"subValue\":
\"123\"} ]}";
+ final ExamplePOJO2608 result = mapper.readValue(serialized,
ExamplePOJO2608.class);
+ assertNotNull(result);
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/failing/EnumDeserialization2787Test.java
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/failing/EnumDeserialization2787Test.java
---
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/failing/EnumDeserialization2787Test.java
1970-01-01 01:00:00.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/failing/EnumDeserialization2787Test.java
2020-12-02 04:44:24.000000000 +0100
@@ -0,0 +1,42 @@
+package com.fasterxml.jackson.failing;
+
+import com.fasterxml.jackson.annotation.*;
+
+import com.fasterxml.jackson.databind.*;
+
+public class EnumDeserialization2787Test extends BaseMapTest
+{
+ // [databind#2787]
+ static enum SomeEnum2787 {
+ none,
+ tax10,
+ tax20
+ }
+
+ static enum SomeEnumMixin2787 {
+ @JsonProperty("zero")
+ none,
+ @JsonProperty("TypTyp")
+ tax10,
+ @JsonProperty("PytPyt")
+ tax20
+ }
+
+ /*
+ /**********************************************************
+ /* Test methods
+ /**********************************************************
+ */
+
+ protected final ObjectMapper MAPPER = newJsonMapper();
+
+ // [databind#2787]
+ public void testMixinOnEnumValues2787() throws Exception
+ {
+ ObjectMapper mapper = jsonMapperBuilder()
+ .addMixIn(SomeEnum2787.class, SomeEnumMixin2787.class)
+ .build();
+ SomeEnum2787 result = mapper.readValue(quote("zero"),
SomeEnum2787.class);
+ assertEquals(SomeEnum2787.none, result);
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/failing/IgnoreUnknownOnField2627Test.java
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/failing/IgnoreUnknownOnField2627Test.java
---
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/failing/IgnoreUnknownOnField2627Test.java
1970-01-01 01:00:00.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/failing/IgnoreUnknownOnField2627Test.java
2020-12-02 04:44:24.000000000 +0100
@@ -0,0 +1,38 @@
+package com.fasterxml.jackson.failing;
+
+import java.io.IOException;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+import com.fasterxml.jackson.databind.*;
+
+public class IgnoreUnknownOnField2627Test extends BaseMapTest
+{
+ // [databind#2627]
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ static class MyPojoValue {
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ MyPojo2627 value;
+
+ public MyPojo2627 getValue() {
+ return value;
+ }
+ }
+
+ static class MyPojo2627 {
+ public String name;
+ }
+
+ // [databind#2627]
+ public void testFieldIgnoral() throws IOException
+ {
+ ObjectMapper objectMapper = new ObjectMapper();
+ String json = "{\"value\": {\"name\": \"my_name\", \"extra\":
\"val\"}, \"type\":\"Json\"}";
+ MyPojoValue value = objectMapper.readValue(json, MyPojoValue.class);
+ assertNotNull(value);
+ assertNotNull(value.getValue());
+ assertEquals("my_name", value.getValue().name);
+ }
+
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/failing/JDKNumberDeser2644Test.java
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/failing/JDKNumberDeser2644Test.java
---
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/failing/JDKNumberDeser2644Test.java
1970-01-01 01:00:00.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/failing/JDKNumberDeser2644Test.java
2020-12-02 04:44:24.000000000 +0100
@@ -0,0 +1,56 @@
+package com.fasterxml.jackson.failing;
+
+import java.math.BigDecimal;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.databind.*;
+
+public class JDKNumberDeser2644Test extends BaseMapTest
+{
+ // [databind#2644]
+ static class NodeRoot2644 {
+ public String type;
+
+ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include =
JsonTypeInfo.As.EXTERNAL_PROPERTY, property = "type")
+ @JsonSubTypes(value = {
+ @JsonSubTypes.Type(value = NodeParent2644.class, name =
"NodeParent")
+ })
+ public Node2644 node;
+ }
+
+ public static class NodeParent2644 extends Node2644 { }
+
+ public static abstract class Node2644 {
+ @JsonProperty("amount")
+ BigDecimal val;
+
+ public BigDecimal getVal() {
+ return val;
+ }
+
+ public void setVal(BigDecimal val) {
+ this.val = val;
+ }
+ }
+
+ // [databind#2644]
+ public void testBigDecimalSubtypes() throws Exception
+ {
+ ObjectMapper mapper = newJsonMapper();
+
+ // NOTE: uncommenting this does work around the issue:
+// mapper.enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS);
+ mapper.registerSubtypes(NodeParent2644.class);
+
+ NodeRoot2644 root = mapper.readValue(
+ "{\"type\": \"NodeParent\",\"node\": {\"amount\":
9999999999999999.99} }",
+ NodeRoot2644.class
+ );
+
+ assertEquals(new BigDecimal("9999999999999999.99"),
root.node.getVal());
+
+ }
+
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/failing/PropertyAccessReadOnly2118Test.java
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/failing/PropertyAccessReadOnly2118Test.java
---
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/failing/PropertyAccessReadOnly2118Test.java
1970-01-01 01:00:00.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/failing/PropertyAccessReadOnly2118Test.java
2020-12-02 04:44:24.000000000 +0100
@@ -0,0 +1,54 @@
+package com.fasterxml.jackson.failing;
+
+import java.util.*;
+
+import com.fasterxml.jackson.annotation.*;
+
+import com.fasterxml.jackson.databind.*;
+
+public class PropertyAccessReadOnly2118Test extends BaseMapTest
+{
+ // [databind#2118]
+ static class SecurityGroup {
+
+ private List<SecurityGroupRule> securityGroupRules;
+
+ public SecurityGroup() {
+ this.securityGroupRules = new ArrayList<>();
+ }
+
+ @JsonProperty(value="security_group_rules",
access=JsonProperty.Access.READ_ONLY)
+ public List<SecurityGroupRule> getSecurityGroupRules() {
+ return securityGroupRules;
+ }
+
+ public SecurityGroup setSecurityGroupRules(List<SecurityGroupRule>
securityGroupRules) {
+ throw new Error("Should not be called");
+ }
+ }
+
+ static class SecurityGroupRule {
+ private String id;
+
+ public SecurityGroupRule() { }
+
+ @JsonProperty
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+ }
+
+ // [databind#2118]
+ public void testAccessReadOnly() throws Exception {
+ String data ="{\"security_group_rules\": [{\"id\": \"id1\"}, {\"id\":
\"id2\"}, {\"id\": \"id3\"}, {\"id\": \"id4\"}]}";
+ ObjectMapper mapper = new ObjectMapper();
+// This would work around the issue:
+// mapper.disable(MapperFeature.USE_GETTERS_AS_SETTERS);
+ SecurityGroup sg = mapper.readValue(data, SecurityGroup.class);
+ System.out.println(mapper.writeValueAsString(sg));
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/failing/RequireSetterForGetter736Test.java
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/failing/RequireSetterForGetter736Test.java
---
old/jackson-databind-jackson-databind-2.10.3/src/test/java/com/fasterxml/jackson/failing/RequireSetterForGetter736Test.java
2020-03-03 04:14:56.000000000 +0100
+++
new/jackson-databind-jackson-databind-2.10.5.1/src/test/java/com/fasterxml/jackson/failing/RequireSetterForGetter736Test.java
2020-12-02 04:44:24.000000000 +0100
@@ -31,6 +31,7 @@
{
ObjectMapper mapper = jsonMapperBuilder()
.visibility(PropertyAccessor.ALL, Visibility.NONE)
+ .visibility(PropertyAccessor.FIELD, Visibility.NONE)
.visibility(PropertyAccessor.GETTER, Visibility.PUBLIC_ONLY)
.visibility(PropertyAccessor.SETTER, Visibility.PUBLIC_ONLY)
.enable(MapperFeature.REQUIRE_SETTERS_FOR_GETTERS)
@@ -39,6 +40,5 @@
String json = mapper.writeValueAsString(dataB);
assertEquals(aposToQuotes("{'readwrite':2}"), json);
-
}
}