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/utils/misc/src/main/java/org/onlab/util/Tools.java b/utils/misc/src/main/java/org/onlab/util/Tools.java
index 69baf47..550b82f 100644
--- a/utils/misc/src/main/java/org/onlab/util/Tools.java
+++ b/utils/misc/src/main/java/org/onlab/util/Tools.java
@@ -15,6 +15,8 @@
  */
 package org.onlab.util;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.google.common.base.Charsets;
 import com.google.common.base.Strings;
 import com.google.common.collect.Lists;
@@ -24,6 +26,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.io.InputStream;
 import java.nio.ByteBuffer;
 import java.nio.file.FileVisitResult;
 import java.nio.file.Files;
@@ -75,6 +78,8 @@
 
     private static Random random = new SecureRandom();
 
+    private static final String INPUT_JSON_CANNOT_BE_NULL = "Input JSON cannot be null";
+
     /**
      * Returns a thread factory that produces threads named according to the
      * supplied name pattern.
@@ -218,6 +223,19 @@
     }
 
     /**
+     * Utility to convert a mapper and an input stream into a JSON tree,
+     * and be tolerant of a null tree being returned.
+     *
+     * @param mapper JSON object mapper
+     * @param stream IO stream containing the JSON
+     * @return object node for the given
+     * @throws IOException if JSON parsing fails
+     */
+    public static ObjectNode readTreeFromStream(ObjectMapper mapper, InputStream stream) throws IOException {
+        return  nullIsIllegal((ObjectNode) mapper.readTree(stream), INPUT_JSON_CANNOT_BE_NULL);
+    }
+
+    /**
      * Converts a string from hex to long.
      *
      * @param string hex number in string form; sans 0x