Skip to content

Conversation

@Artur-
Copy link
Member

@Artur- Artur- commented Dec 5, 2025

Element.callJsFunction was incorrectly using Serializable[] for parameter storage and System.arraycopy to copy Object[] arguments. This caused ArrayStoreException when passing non-Serializable objects like plain beans or records.

Changed to use Object[] instead, matching the implementation pattern used in Element.executeJs and Page.executeJs, which correctly support all Jackson-serializable types including non-Serializable beans.

Added test to verify beans can be passed to callJsFunction.

Element.callJsFunction was incorrectly using Serializable[] for
parameter storage and System.arraycopy to copy Object[] arguments.
This caused ArrayStoreException when passing non-Serializable objects
like plain beans or records.

Changed to use Object[] instead, matching the implementation pattern
used in Element.executeJs and Page.executeJs, which correctly support
all Jackson-serializable types including non-Serializable beans.

Added test to verify beans can be passed to callJsFunction.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 5, 2025

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Test Results

1 305 files  ±0  1 305 suites  ±0   1h 17m 15s ⏱️ + 1m 4s
9 168 tests +1  9 101 ✅ +1  67 💤 ±0  0 ❌ ±0 
9 617 runs   - 6  9 543 ✅  - 5  74 💤  - 1  0 ❌ ±0 

Results for commit ecb5ace. ± Comparison against base commit b5e7bbc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants