From 9cbca383a8fdd1c079f35ceecb8787a70a15c585 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 24 May 2018 13:24:12 -0400 Subject: Don't build credentials if user name is empty Modified code to skip building credentials if user name is empty, in addition to case where user name is null. Change-Id: I5b53d4f97263df98cfe082f44a4e6af64b1e488b Issue-ID: POLICY-868 Signed-off-by: Jim Hahn --- .../model-impl/rest/src/main/java/org/onap/policy/rest/RESTManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'controlloop/common/model-impl/rest/src/main') diff --git a/controlloop/common/model-impl/rest/src/main/java/org/onap/policy/rest/RESTManager.java b/controlloop/common/model-impl/rest/src/main/java/org/onap/policy/rest/RESTManager.java index 6b8b6f09a..52ce13ef9 100644 --- a/controlloop/common/model-impl/rest/src/main/java/org/onap/policy/rest/RESTManager.java +++ b/controlloop/common/model-impl/rest/src/main/java/org/onap/policy/rest/RESTManager.java @@ -146,7 +146,7 @@ public class RESTManager { } private String makeAuthHeader(String username, String password) { - if (username == null) { + if (username == null || username.isEmpty()) { return null; } -- cgit 1.2.3-korg