From 8e70d033456ca50379fd6d684093da3191e8e85a Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Tue, 15 May 2018 17:42:59 +0530 Subject: Fix the moco null pointer execption Issue-ID: CLI-100 Change-Id: I0bbba49ee9e15bf6557f5602321f06fb47274de9 Signed-off-by: Kanagaraj Manickam k00365106 --- .../http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'profiles/http/src') 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(); } } -- cgit 1.2.3-korg