Skip to content

Fix ClassCastException when adding headers to non-RequestWrapper requ… - #430

Merged
DanBezalelpx merged 2 commits into
devfrom
fix/de_bug
Jun 29, 2026
Merged

Fix ClassCastException when adding headers to non-RequestWrapper requ…#430
DanBezalelpx merged 2 commits into
devfrom
fix/de_bug

Conversation

@DanBezalelpx

Copy link
Copy Markdown
Contributor

…ests

The SDK blindly cast HttpServletRequest to RequestWrapper when injecting data enrichment, breached account, and additional S2S activity headers. This caused a ClassCastException for customers using their own HttpServletRequestWrapper implementations.

Introduces addHeaderSafely() which checks instanceof before casting. If the request is not a RequestWrapper, falls back to request.setAttribute() so the data is still accessible to the customer's application.

DanBpx added 2 commits June 25, 2026 15:32
…ests

The SDK blindly cast HttpServletRequest to RequestWrapper when injecting
data enrichment, breached account, and additional S2S activity headers.
This caused a ClassCastException for customers using their own
HttpServletRequestWrapper implementations.

Introduces addHeaderSafely() which checks instanceof before casting. If
the request is not a RequestWrapper, falls back to request.setAttribute()
so the data is still accessible to the customer's application.
@DanBezalelpx
DanBezalelpx merged commit d7f6b94 into dev Jun 29, 2026
8 of 11 checks passed
@DanBezalelpx
DanBezalelpx deleted the fix/de_bug branch June 29, 2026 09:42
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.

2 participants