Merge pull request #1397 from Stirling-Tools/pixeebot/drip-2024-06-07-sonar-java/avoid-implicit-public-constructor-s1118
(Sonar) Fixed finding: "Utility classes should not have public constructors"
This commit is contained in:
commit
4f5b19edfb
1 changed files with 3 additions and 0 deletions
|
@ -4,6 +4,9 @@ import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
public class UrlUtils {
|
public class UrlUtils {
|
||||||
|
|
||||||
|
private UrlUtils() {
|
||||||
|
}
|
||||||
|
|
||||||
public static String getOrigin(HttpServletRequest request) {
|
public static String getOrigin(HttpServletRequest request) {
|
||||||
String scheme = request.getScheme(); // http or https
|
String scheme = request.getScheme(); // http or https
|
||||||
String serverName = request.getServerName(); // localhost
|
String serverName = request.getServerName(); // localhost
|
||||||
|
|
Loading…
Reference in a new issue