This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new 2a025bce1 Fix possible NPE in JsonMap.append()
2a025bce1 is described below
commit 2a025bce179f27ca9599219e52f19f344fa44025
Author: JamesBognar <[email protected]>
AuthorDate: Thu Jun 16 11:20:47 2022 -0400
Fix possible NPE in JsonMap.append()
---
.../src/main/java/org/apache/juneau/collections/JsonMap.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonMap.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonMap.java
index 9cd46d3c3..021ec4848 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonMap.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonMap.java
@@ -447,11 +447,12 @@ public class JsonMap extends LinkedHashMap<String,Object>
{
/**
* Appends all the entries in the specified map to this map.
*
- * @param values The map to copy.
+ * @param values The map to copy. Can be <jk>null</jk>.
* @return This object.
*/
public JsonMap append(Map<String,Object> values) {
- super.putAll(values);
+ if (values != null)
+ super.putAll(values);
return this;
}