diff options
author | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2018-08-16 10:09:50 +0530 |
---|---|---|
committer | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2018-08-16 10:09:50 +0530 |
commit | 1674516cf0ca95abefcba9df25ad6ade3076a0b0 (patch) | |
tree | fc091c64b6998281d9d76acbcd587e3981da61ec /profiles/command/src | |
parent | 9b1e2e77b422c4a5bb264970e8c3a28a0dca7657 (diff) |
Fix nullpointer execption in command profile
Issue-ID: CLI-123
Change-Id: Iea7e2aff4482734c97a56435d42a96c92c30eca0
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'profiles/command/src')
-rw-r--r-- | profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/ProcessRunner.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/ProcessRunner.java b/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/ProcessRunner.java index c0b93bb8..a86a0ff5 100644 --- a/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/ProcessRunner.java +++ b/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/ProcessRunner.java @@ -94,7 +94,9 @@ public class ProcessRunner { sb.append(line + System.getProperty("line.separator")); } } finally { - br.close(); + if (br != null) { + br.close(); + } } return sb.toString(); } |