From: Kanagaraj Manickam k00365106 Date: Tue, 15 May 2018 12:12:59 +0000 (+0530) Subject: Fix the moco null pointer execption X-Git-Tag: v2.0.2~5 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=8e70d033456ca50379fd6d684093da3191e8e85a;p=cli.git Fix the moco null pointer execption Issue-ID: CLI-100 Change-Id: I0bbba49ee9e15bf6557f5602321f06fb47274de9 Signed-off-by: Kanagaraj Manickam k00365106 --- diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java index 708f8edb..14728ad0 100644 --- a/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java +++ b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java @@ -64,7 +64,7 @@ public class OnapHttpCommand extends OnapCommand { private OnapCommandHttpService oclipService = new OnapCommandHttpService(); - private MocoServer mocoServer; + private MocoServer mocoServer = null; boolean shouldVerify = false; @@ -194,7 +194,7 @@ public class OnapHttpCommand extends OnapCommand { @Override protected void postRun() throws OnapCommandException { - if (shouldVerify && mockingEnabled) { + if (mocoServer != null) { mocoServer.stop(); } }