-
Notifications
You must be signed in to change notification settings - Fork 186
test: Add tests for collection serialization #22382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Test Results1 058 files - 27 1 058 suites - 27 1h 2m 16s ⏱️ - 10m 55s For more details on these failures, see this check. Results for commit ac46285. ± Comparison against base commit 3113fad. This pull request removes 421 and adds 2038 tests. Note that renamed tests count towards both.
This pull request removes 23 skipped tests and adds 1 skipped test. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
e0d8ad9
to
cf05e53
Compare
Replaces the array-based type encoding system [typeId, ...data] with a universal @v object format {"@v": "type", ...} for Vaadin Flow's client-server JSON communication. Key changes: - Server-side: JacksonCodec and JsonCodec now encode components as {"@v": "node", "id": nodeId} instead of [0, nodeId] - Server-side: Return channels as {"@v": "return", "nodeId": x, "channelId": y} instead of [2, nodeId, channelId] - Client-side: ClientJsonCodec updated to decode @v objects with proper timing - Collections now use standard JSON arrays without problematic wrapping - Removed legacy NODE_TYPE, ARRAY_TYPE, RETURN_CHANNEL_TYPE constants - Updated all tests to expect @v format Benefits: - Fixes collection serialization issues that caused test failures - Cleaner architecture with universal @v system instead of type constants - Better extensibility for adding new @v types - Preserved timing where elements are created before @v resolution - Improved performance with simplified decoding logic 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace fully qualified class names with proper imports for better code readability: - Add JsonObject import in ClientJsonCodec.java - Add ObjectNode and NullNode imports in JacksonCodec.java - Update all references to use imported class names 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Remove unnecessary native JavaScript methods for property access. GWT's JsonObject methods already compile to efficient JavaScript. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace verbose object format with more compact representation: - Nodes: {"@v": "node", "id": nodeId} → {"@v-node": nodeId} - Return channels: {"@v": "return", "nodeId": x, "channelId": y} → {"@v-return": [x, y]} This reduces network payload size for client-server communication while maintaining the same functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Reject objects with unknown @V- prefixed properties to maintain forward compatibility. This ensures that if new types are added in the future, older clients will fail cleanly rather than misinterpreting the data. Added tests to verify the validation works correctly for both decodeWithTypeInfo and decodeStateNode methods. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…lines Remove "compact", "now", and "should now" references from comments that described changes rather than current behavior. Comments should describe how code works and why, not what has changed from previous versions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
cf05e53
to
ee7a2de
Compare
TC Format Checker Report - 12:04 - 02 - Oct
Here is the list of files with format issues in your PR:
|
Add comprehensive recursive decoding functionality that processes nested @v-node and @v-return references within JSON objects and arrays. The implementation uses WidgetUtil.crazyJsCast for seamless GWT integration and in-place modification of JSON structures for efficiency. Key changes: - Recursive processing of nested objects and arrays containing @v references - Simplified @V-Type validation without redundant prefix checks - Comprehensive test coverage for complex nested structures - Moved tests to GWT environment (test-gwt) for proper execution context - Removed test-specific workarounds from production code 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Remove confusing comment that mentions "custom serializers" handling component references, as there are currently no such custom serializers in the standard Jackson serialization path. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Improve error handling in ClientJsonCodec by throwing descriptive IllegalArgumentExceptions instead of silently ignoring malformed data: - @v-node values must be numbers, not other JSON types - @v-return values must be arrays with at least 2 elements - Error messages include the actual type/length and full JSON context This makes the code more resilient and easier to debug when encountering malformed JSON with invalid @V-Type structures. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
ee7a2de
to
5035d5d
Compare
Extends existing collection serialization support with comprehensive tests for collection of complex objects (beans) in both directions. Changes: - Added unit tests for List<SimpleBean> and Set<SimpleBean> serialization/deserialization - Added integration tests with UI examples demonstrating List<Bean> usage - Verified collection of beans work with existing Jackson serialization Tests verify: - List<Bean>/Set<Bean> → JSON arrays of objects (serialization) - JSON arrays → List<Bean>/Set<Bean> (deserialization) - Live browser integration with collection parameters and return values 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
5035d5d
to
ac46285
Compare
|
Adds comprehensive support for Java collections (List, Set, etc.) in both
directions of executeJs communication:
Features:
Examples: