From f044a7e5bfc4aae70fd5feaa43f2f0ddf1f67ad8 Mon Sep 17 00:00:00 2001 From: Deepak Dixit Date: Sat, 7 Sep 2024 02:45:46 +0530 Subject: [PATCH] Updated method to check if the string starts with component:// instead of merely containing it. --- .../src/main/java/org/apache/ofbiz/base/util/UtilValidate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilValidate.java b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilValidate.java index 0dd1f74264..26c8891fde 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilValidate.java +++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilValidate.java @@ -762,7 +762,7 @@ public static boolean isUrl(String s) { * @return true if s contains :// and not "component://" */ public static boolean urlInString(String s) { - if (isEmpty(s) || s.contains("component://")) { + if (isEmpty(s) || s.startsWith("component://")) { return false; } return s.indexOf("://") != -1;