From 2776b2cf7b08f1c389ff1b5770b3aca807f478c8 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 24 Mar 2017 05:25:44 +0100 Subject: Refactored ProxyCLI. The ProxyCLI has been modified to use lazy initialization to get the PKIClient object. --- base/java-tools/src/com/netscape/cmstools/cli/ProxyCLI.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'base/java-tools/src') diff --git a/base/java-tools/src/com/netscape/cmstools/cli/ProxyCLI.java b/base/java-tools/src/com/netscape/cmstools/cli/ProxyCLI.java index 60d4593d4..ad3fdb8b6 100644 --- a/base/java-tools/src/com/netscape/cmstools/cli/ProxyCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/cli/ProxyCLI.java @@ -101,17 +101,17 @@ public class ProxyCLI extends CLI { public void execute(String[] args) throws Exception { - PKIClient client = module.getParent().getClient(); AccountClient accountClient = null; try { // login if username or nickname is specified - ClientConfig config = client.getConfig(); + ClientConfig config = module.getConfig(); if (config.getUsername() != null || config.getCertNickname() != null) { String subsystem = config.getSubsystem(); if (subsystem == null) subsystem = defaultSubsystem; + PKIClient client = module.getClient(); accountClient = new AccountClient(client, subsystem); accountClient.login(); } -- cgit