Commit 20a1bb7
authored
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.1 parent ba1c2c1 commit 20a1bb7
1 file changed
Lines changed: 2 additions & 1 deletion
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
| 207 | + | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
| |||
0 commit comments