diff options
author | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2018-02-05 20:40:34 +0530 |
---|---|---|
committer | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2018-02-05 20:40:34 +0530 |
commit | b6831eb583cd12b776900c06a32bed4835d109e3 (patch) | |
tree | abd35b0e2935ec22dfd2be79699189da246be0ab /profiles/http | |
parent | dd37614bf83ca78ba350a063873444ca20b4fcd7 (diff) |
Make Closable objects are used latter
Issue-ID: CLI-50
Change-Id: I5e54f97ca359ee008a1ef82804b47a4e42231cc3
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'profiles/http')
-rw-r--r-- | profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java | 2 | ||||
-rw-r--r-- | profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java index 5b6df29d..3e03efa7 100644 --- a/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java +++ b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java @@ -129,7 +129,7 @@ public class OnapHttpConnection { this.httpClient = HttpClients.custom().setConnectionManager(connManager) .setRedirectStrategy(new LaxRedirectStrategy()).build(); } else { - this.httpClient = HttpClients.createDefault(); + this.httpClient = HttpClients.createDefault(); // NOSONAR } } catch (Exception e) { throw new OnapCommandHttpFailure(e); diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java b/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java index 09dac49a..4af591ae 100644 --- a/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java +++ b/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java @@ -52,8 +52,7 @@ public class OnapCommandSchemaHttpLoader { try { List<String> errors = new ArrayList<>(); if (includeDefault) { - Map<String, ?> defaultParameterMap = includeDefault ? - OnapCommandSchemaLoader.validateSchemaVersion(OnapCommandHttpConstants.DEFAULT_PARAMETER_HTTP_FILE_NAME, cmd.getSchemaVersion()) : new HashMap<>(); + Map<String, ?> defaultParameterMap = OnapCommandSchemaLoader.validateSchemaVersion(OnapCommandHttpConstants.DEFAULT_PARAMETER_HTTP_FILE_NAME, cmd.getSchemaVersion()); //mrkanag default_parameter is supported only for parameters. if (defaultParameterMap.containsKey(OnapCommandConstants.INFO)) { |