From 7c3e132b1d639a47562414395f00c2a583a4e51d Mon Sep 17 00:00:00 2001 From: erickgonzalez Date: Thu, 14 Nov 2024 10:15:55 -0600 Subject: [PATCH] fix: use UtilMethods.isSet instead of comparing against null. ref: #30130 --- .../java/com/dotcms/vanityurl/business/VanityUrlAPIImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotCMS/src/main/java/com/dotcms/vanityurl/business/VanityUrlAPIImpl.java b/dotCMS/src/main/java/com/dotcms/vanityurl/business/VanityUrlAPIImpl.java index 48c7f0f42a1b..a50934474ebe 100644 --- a/dotCMS/src/main/java/com/dotcms/vanityurl/business/VanityUrlAPIImpl.java +++ b/dotCMS/src/main/java/com/dotcms/vanityurl/business/VanityUrlAPIImpl.java @@ -377,7 +377,7 @@ public boolean handleVanityURLRedirects(final VanityUrlRequestWrapper request, f final String queryString = request.getQueryString(); final int responseCode = request.getResponseCode(); - final String newUrl = uri + (queryString != null ? StringPool.QUESTION + queryString : StringPool.BLANK); + final String newUrl = uri + (UtilMethods.isSet(queryString) ? StringPool.QUESTION + queryString : StringPool.BLANK); if (responseCode == 301 || responseCode == 302) { response.setStatus(responseCode);