Upgrade fasterXML libraries for OS-9
Upgrade fasterXML to version 2.9.5 to address security vulnerability
Wrap calls to treeRead(InputStream) to handle new behavior of null streams
Change-Id: Id199cfacd0cf9e5371dc33de9f1e058c2e72eaa5
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/TenantWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/TenantWebResource.java
index 6e7627e..9250edf 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/TenantWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/TenantWebResource.java
@@ -38,6 +38,8 @@
import java.io.IOException;
import java.io.InputStream;
+import static org.onlab.util.Tools.readTreeFromStream;
+
/**
* Query and manage tenants of virtual networks.
*/
@@ -116,7 +118,7 @@
* @throws IOException if unable to parse the request
*/
private TenantId getTenantIdFromJsonStream(InputStream stream) throws IOException {
- ObjectNode jsonTree = (ObjectNode) mapper().readTree(stream);
+ ObjectNode jsonTree = readTreeFromStream(mapper(), stream);
JsonNode specifiedTenantId = jsonTree.get("id");
if (specifiedTenantId == null) {