From: Instrumental Date: Thu, 1 Nov 2018 14:27:57 +0000 (-0500) Subject: Fix Agent showpass X-Git-Tag: 2.1.7~14 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=f3f17a63fec476c0aea5c67153d02fa2dd8897eb;p=aaf%2Fauthz.git Fix Agent showpass Issue-ID: AAF-601 Change-Id: Ifc1b71edad9516ef8712d93898bc78164f8efcca Signed-off-by: Instrumental --- diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java index 3facc930..4a5fbd45 100644 --- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java +++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java @@ -680,9 +680,12 @@ public class Agent { FileInputStream fis = new FileInputStream(new File(dir,a.getNs()+".cred.props")); try { props.load(fis); - fis.close(); - fis = new FileInputStream(new File(dir,a.getNs()+".chal")); - props.load(fis); + File chalFile = new File(dir,a.getNs()+".chal"); + if(chalFile.exists()) { + fis.close(); + fis = new FileInputStream(chalFile); + props.load(fis); + } } finally { fis.close(); }