From 11dbcf7a76038c053a5cd62613c8511828707f09 Mon Sep 17 00:00:00 2001 From: Siddhesh Phatak Date: Thu, 18 Jan 2024 12:56:27 -0800 Subject: [PATCH] RANGER-4660: fixed error while creating service having name without an underscore --- .../src/main/java/org/apache/ranger/rest/ServiceREST.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java b/security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java index f9fd4941e1..1147d9b1a5 100644 --- a/security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java +++ b/security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java @@ -4405,7 +4405,7 @@ private String computeLinkedServiceName() { if (StringUtils.isBlank(ret)) { final int lastIndexOfSep = StringUtils.lastIndexOf(resourceServiceName, SEP); - ret = (lastIndexOfSep != -1) ? resourceServiceName.substring(0, lastIndexOfSep) + SEP + linkedServiceType : null; + ret = (lastIndexOfSep != -1) ? resourceServiceName.substring(0, lastIndexOfSep) + SEP + linkedServiceType : linkedServiceType; } return ret;