From 489e54dac1943c9c4f4a8f9b58e27725eabfa5d5 Mon Sep 17 00:00:00 2001 From: "pixeebot[bot]" <104101892+pixeebot[bot]@users.noreply.github.com> Date: Sun, 15 Dec 2024 13:31:48 +0000 Subject: [PATCH] Switch order of literals to prevent NullPointerException --- src/main/java/stirling/software/SPDF/utils/GeneralUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/stirling/software/SPDF/utils/GeneralUtils.java b/src/main/java/stirling/software/SPDF/utils/GeneralUtils.java index bb3bbc04d87..5e8e31f60d6 100644 --- a/src/main/java/stirling/software/SPDF/utils/GeneralUtils.java +++ b/src/main/java/stirling/software/SPDF/utils/GeneralUtils.java @@ -93,7 +93,7 @@ public static boolean isURLReachable(String urlStr) { // Allow only http and https protocols String protocol = url.getProtocol(); - if (!protocol.equals("http") && !protocol.equals("https")) { + if (!"http".equals(protocol) && !"https".equals(protocol)) { return false; // Disallow other protocols }