From ec860c8ca49cf3b9b53682ced807aea1d292fc93 Mon Sep 17 00:00:00 2001 From: Sean Lin Date: Tue, 26 Jun 2018 15:26:59 -0700 Subject: [PATCH] * fix issue where getPath() would return "sdb-name/null" instead of "sdb-name/" (#167) --- gradle.properties | 2 +- .../java/com/nike/cerberus/domain/SecureDataRequestInfo.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index d960ff62b..2148ebb24 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,6 +14,6 @@ # limitations under the License. # -version=3.17.0 +version=3.18.0 groupId=com.nike.cerberus artifactId=cms diff --git a/src/main/java/com/nike/cerberus/domain/SecureDataRequestInfo.java b/src/main/java/com/nike/cerberus/domain/SecureDataRequestInfo.java index f1f7e9c73..c4970ba43 100644 --- a/src/main/java/com/nike/cerberus/domain/SecureDataRequestInfo.java +++ b/src/main/java/com/nike/cerberus/domain/SecureDataRequestInfo.java @@ -19,6 +19,8 @@ import com.nike.cerberus.security.CerberusPrincipal; +import java.util.Optional; + public class SecureDataRequestInfo { private String category; private String sdbSlug; @@ -68,6 +70,6 @@ public SecureDataRequestInfo setPrincipal(CerberusPrincipal principal) { } public String getPath() { - return String.format("%s/%s", sdbSlug, subPath); + return String.format("%s/%s", sdbSlug, Optional.ofNullable(subPath).orElse("")); } }