diff options
| author | Endi S. Dewata <edewata@redhat.com> | 2017-03-24 05:25:44 +0100 |
|---|---|---|
| committer | Endi S. Dewata <edewata@redhat.com> | 2017-03-24 16:39:23 +0100 |
| commit | 2776b2cf7b08f1c389ff1b5770b3aca807f478c8 (patch) | |
| tree | 24243037615ffcbbe85873663a352514a3449894 /base/java-tools | |
| parent | c1a3059c0e424193ff414c49f1eb2a1ec5ab4a39 (diff) | |
| download | pki-2776b2cf7b08f1c389ff1b5770b3aca807f478c8.tar.gz pki-2776b2cf7b08f1c389ff1b5770b3aca807f478c8.tar.xz pki-2776b2cf7b08f1c389ff1b5770b3aca807f478c8.zip | |
Refactored ProxyCLI.
The ProxyCLI has been modified to use lazy initialization to get
the PKIClient object.
Diffstat (limited to 'base/java-tools')
| -rw-r--r-- | base/java-tools/src/com/netscape/cmstools/cli/ProxyCLI.java | 4 |
1 files changed, 2 insertions, 2 deletions
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(); } |
