This is an automated email from the ASF dual-hosted git repository.
ashishvijaywargiya pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new 20a1bb721c We are getting 3,713 occurrences of below message when we
run below command (#1321)
20a1bb721c is described below
commit 20a1bb721c1af30c604845ba2fccbac7de078f64
Author: Ashish Vijaywargiya <[email protected]>
AuthorDate: Wed Jun 3 00:23:17 2026 +0530
We are getting 3,713 occurrences of below message when we run below command
(#1321)
./gradlew testIntegration
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.
---
.../main/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 class ServiceEcaCondition implements
java.io.Serializable {
Debug.logWarning(message.toString(), MODULE);
}
}
- if (!cond) {
+ if (cond == null) {
Debug.logWarning("doRealCompare returned null, returning false",
MODULE);
+ return false;
}
return cond;
}