Removing jackson to mitigate cve-2017-4995
[vfc/nfvo/driver/vnfm/svnfm.git] / nokiav2 / driver / src / main / java / org / onap / vfc / nfvo / driver / vnfm / svnfm / nokia / util / SystemFunctions.java
index 0bb6303..c7fac86 100644 (file)
 package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.util;
 
 import com.google.common.io.ByteStreams;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-
+import io.reactivex.Observable;
 import java.io.InputStream;
 import java.io.PrintStream;
+import java.util.NoSuchElementException;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
 
 /**
  * Wrapper class for static method calls to core or core libraries.
@@ -162,4 +163,17 @@ public class SystemFunctions {
         return HttpClients.createDefault();
     }
 
+    /**
+     * Execute blocking first
+     *
+     * @param observable the observable
+     */
+    public void blockingFirst(Observable<Void> observable) {
+        try {
+            observable.blockingFirst();
+        } catch (NoSuchElementException e) {
+            //swallow void returns null :)
+        }
+    }
+
 }
\ No newline at end of file