From 88338b4dbc0ad605074368df2bb05daca1d51995 Mon Sep 17 00:00:00 2001 From: "pixeebot[bot]" <104101892+pixeebot[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 07:52:26 +0000 Subject: [PATCH] (Sonar) Fixed finding: "Utility classes should not have public constructors" --- src/main/java/stirling/software/SPDF/utils/UrlUtils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/stirling/software/SPDF/utils/UrlUtils.java b/src/main/java/stirling/software/SPDF/utils/UrlUtils.java index 991713de..07619249 100644 --- a/src/main/java/stirling/software/SPDF/utils/UrlUtils.java +++ b/src/main/java/stirling/software/SPDF/utils/UrlUtils.java @@ -4,6 +4,9 @@ import jakarta.servlet.http.HttpServletRequest; public class UrlUtils { +private UrlUtils() { +} + public static String getOrigin(HttpServletRequest request) { String scheme = request.getScheme(); // http or https String serverName = request.getServerName(); // localhost