From 43093c1a4b9861b99493d6d364ca54dc1cdcefc5 Mon Sep 17 00:00:00 2001 From: Ashish Vijaywargiya Date: Tue, 2 Jun 2026 23:52:53 +0530 Subject: [PATCH] We are getting 3,713 occurrences of below message when we run ./gradlew testIntegration. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2026-06-02 23:43:46,054 |main |ServiceEcaCondition |W| doRealCompare returned null, returning false 2026-06-02 23:43:46,054 |main |ServiceEcaCondition |W| doRealCompare returned null, returning false 2026-06-02 23:43:46,054 |main |ServiceEcaCondition |W| doRealCompare returned null, returning false Here's a quick summary of the change at ServiceEcaCondition.java:205: Before: if (!cond) { // fires every time comparison returns false — ~3,713 warnings Debug.logWarning("doRealCompare returned null, returning false", MODULE); } return cond; After: if (cond == null) { // fires only if doRealCompare returns null (never, currently) Debug.logWarning("doRealCompare returned null, returning false", MODULE); return false; } return cond; !cond (unboxed Boolean inversion) was being evaluated as "is false?", causing the warning to log on every normal false result from an ECA condition check. The intent was cond == null — guarding against an unexpected null return. The added return false inside the guard also prevents a future NullPointerException if doRealCompare ever returns null and the caller tries to unbox it. --- .../java/org/apache/ofbiz/service/eca/ServiceEcaCondition.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaCondition.java b/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaCondition.java index 8efccffef3..1ba92a2d1b 100644 --- a/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaCondition.java +++ b/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaCondition.java @@ -202,8 +202,9 @@ public boolean eval(String serviceName, DispatchContext dctx, Map