Skip to content

Fix NullPointerException when logging an MVEL action failure (#67)#152

Open
amenski wants to merge 1 commit into
hekailiang:masterfrom
amenski:fix/issue-67-mvel-npe
Open

Fix NullPointerException when logging an MVEL action failure (#67)#152
amenski wants to merge 1 commit into
hekailiang:masterfrom
amenski:fix/issue-67-mvel-npe

Conversation

@amenski

@amenski amenski commented May 21, 2026

Copy link
Copy Markdown

Summary

MvelActionImpl logged action failures with e.getCause().getMessage(). When the caught RuntimeException had no cause, this threw a NullPointerException inside the catch block, masking the original error.

This applies the same null-safe logging already used by MvelConditionImpl.

Fixes #67.

Test plan

  • Added MvelActionImplTest - verified to fail on the original code and pass with the fix.
  • Full suite passes (157 tests, JDK 8).

MvelActionImpl logged failures with e.getCause().getMessage(), which
threw a NullPointerException whenever the caught RuntimeException had no
cause, masking the original error. Apply the same null-safe logging
already used by MvelConditionImpl.
@amenski amenski force-pushed the fix/issue-67-mvel-npe branch from 2265d28 to 4ab2925 Compare May 21, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logging an error causes a NullPointerException

1 participant