From 0d168dfa8d1ca2a0eefcb0992d217968bec8599d Mon Sep 17 00:00:00 2001 From: silmyhasan Date: Mon, 30 Sep 2024 18:22:36 +0530 Subject: [PATCH] fix null pointer error --- .../product/src/main/extensions/header.jsp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/distribution/product/src/main/extensions/header.jsp b/modules/distribution/product/src/main/extensions/header.jsp index 99d246b21c..49980b8249 100644 --- a/modules/distribution/product/src/main/extensions/header.jsp +++ b/modules/distribution/product/src/main/extensions/header.jsp @@ -40,12 +40,14 @@ if (cb != null) { URI uri = new URI(cb); String decodedValue = uri.getQuery(); - String[] params = decodedValue.split("&"); - for (String param : params) { - if (param.startsWith("tenantDomain=") || param.startsWith("TenantDomain=")) { - String[] keyVal = param.split("="); - tenant = keyVal[1]; - } + if (decodedValue != null) { + String[] params = decodedValue.split("&"); + for (String param : params) { + if (param.startsWith("tenantDomain=") || param.startsWith("TenantDomain=")) { + String[] keyVal = param.split("="); + tenant = keyVal[1]; + } + } } } }