-
Notifications
You must be signed in to change notification settings - Fork 168
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
Add primitive default data support on evendata #4132
Conversation
Added primitive checking on event data value decoding, so that primitive values get default values instead of null. Fixes issue #4112
Reviewed 5 of 5 files at r1. flow-server/src/main/java/com/vaadin/flow/component/ComponentEventBus.java, line 26 at r1 (raw file):
Is flow-server/src/main/java/com/vaadin/flow/component/ComponentEventBusUtil.java, line 108 at r1 (raw file):
Are you sure that you need May be do not call flow-server/src/main/java/com/vaadin/flow/internal/JsonCodec.java, line 233 at r1 (raw file):
What does it return if Is it possible do not create a new method but reuse existing one and check Comments from Reviewable |
Review status: all files reviewed at latest revision, 3 unresolved discussions. flow-server/src/main/java/com/vaadin/flow/component/ComponentEventBus.java, line 26 at r1 (raw file): Previously, denis-anisimov (Denis) wrote…
Comments from Reviewable |
Removed Pair -usage and moved primitive casting and checking prior to decode -call
Review status: 3 of 5 files reviewed at latest revision, 3 unresolved discussions, some commit checks broke. flow-server/src/main/java/com/vaadin/flow/internal/JsonCodec.java, line 233 at r1 (raw file): Previously, denis-anisimov (Denis) wrote…
If null is not allowed and value is null, then it will fall back to get default data, like false for boolean / Boolean. Can't really do all the conversion logic within the decodeAs -method, for it would either need:
Comments from Reviewable |
Review status: 3 of 5 files reviewed at latest revision, 2 unresolved discussions. flow-server/src/main/java/com/vaadin/flow/internal/JsonCodec.java, line 233 at r1 (raw file):
of course
Why ? ( Comments from Reviewable |
Reviewed 1 of 2 files at r2, 1 of 1 files at r3. Comments from Reviewable |
- Added primitives support toJsonCodec.decodeAS - Added tests for primitives
Review status: 3 of 6 files reviewed at latest revision, 1 unresolved discussion. flow-server/src/main/java/com/vaadin/flow/internal/JsonCodec.java, line 233 at r1 (raw file): Previously, denis-anisimov (Denis) wrote…
Changed as requested, also added tests for new supported types Comments from Reviewable |
SonarQube analysis reported 1 issue Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:
|
Reviewed 3 of 3 files at r4. Comments from Reviewable |
For hierarchical data, even when the child components are filtered out, the clear method on ArrayUpdater.Update in HierarchicalCommunicationController is never called. This is caused by an if check, in which the start index of previousActive is compared to the newly calculated assumedSize. Since there might be items to clear, the newly calculated size should have no effect on whether we clear the items or not. This check is not present in the DataCommunicator counterpart within the method collectChangesToSend. This PR removes the aforementioned clear condition. Add test to ensure that the expanded children are cleared properly when filtered out. Fixes #4132
For hierarchical data, even when the child components are filtered out, the clear method on ArrayUpdater.Update in HierarchicalCommunicationController is never called. This is caused by an if check, in which the start index of previousActive is compared to the newly calculated assumedSize. Since there might be items to clear, the newly calculated size should have no effect on whether we clear the items or not. This check is not present in the DataCommunicator counterpart within the method collectChangesToSend. This PR removes the aforementioned clear condition. Add test to ensure that the expanded children are cleared properly when filtered out. Fixes #4132
For hierarchical data, even when the child components are filtered out, the clear method on ArrayUpdater.Update in HierarchicalCommunicationController is never called. This is caused by an if check, in which the start index of previousActive is compared to the newly calculated assumedSize. Since there might be items to clear, the newly calculated size should have no effect on whether we clear the items or not. This check is not present in the DataCommunicator counterpart within the method collectChangesToSend. This PR removes the aforementioned clear condition. Add test to ensure that the expanded children are cleared properly when filtered out. Fixes #4132
For hierarchical data, even when the child components are filtered out, the clear method on ArrayUpdater.Update in HierarchicalCommunicationController is never called. This is caused by an if check, in which the start index of previousActive is compared to the newly calculated assumedSize. Since there might be items to clear, the newly calculated size should have no effect on whether we clear the items or not. This check is not present in the DataCommunicator counterpart within the method collectChangesToSend. This PR removes the aforementioned clear condition. Add test to ensure that the expanded children are cleared properly when filtered out. Fixes #4132
For hierarchical data, even when the child components are filtered out, the clear method on ArrayUpdater.Update in HierarchicalCommunicationController is never called. This is caused by an if check, in which the start index of previousActive is compared to the newly calculated assumedSize. Since there might be items to clear, the newly calculated size should have no effect on whether we clear the items or not. This check is not present in the DataCommunicator counterpart within the method collectChangesToSend. This PR removes the aforementioned clear condition. Add test to ensure that the expanded children are cleared properly when filtered out. Fixes #4132
For hierarchical data, even when the child components are filtered out, the clear method on ArrayUpdater.Update in HierarchicalCommunicationController is never called. This is caused by an if check, in which the start index of previousActive is compared to the newly calculated assumedSize. Since there might be items to clear, the newly calculated size should have no effect on whether we clear the items or not. This check is not present in the DataCommunicator counterpart within the method collectChangesToSend. This PR removes the aforementioned clear condition. Add test to ensure that the expanded children are cleared properly when filtered out. Fixes #4132
For hierarchical data, even when the child components are filtered out, the clear method on ArrayUpdater.Update in HierarchicalCommunicationController is never called. This is caused by an if check, in which the start index of previousActive is compared to the newly calculated assumedSize. Since there might be items to clear, the newly calculated size should have no effect on whether we clear the items or not. This check is not present in the DataCommunicator counterpart within the method collectChangesToSend. This PR removes the aforementioned clear condition. Add test to ensure that the expanded children are cleared properly when filtered out. Fixes #4132 Co-authored-by: Ugur Saglam <[email protected]>
For hierarchical data, even when the child components are filtered out, the clear method on ArrayUpdater.Update in HierarchicalCommunicationController is never called. This is caused by an if check, in which the start index of previousActive is compared to the newly calculated assumedSize. Since there might be items to clear, the newly calculated size should have no effect on whether we clear the items or not. This check is not present in the DataCommunicator counterpart within the method collectChangesToSend. This PR removes the aforementioned clear condition. Add test to ensure that the expanded children are cleared properly when filtered out. Fixes #4132 Co-authored-by: Ugur Saglam <[email protected]>
For hierarchical data, even when the child components are filtered out, the clear method on ArrayUpdater.Update in HierarchicalCommunicationController is never called. This is caused by an if check, in which the start index of previousActive is compared to the newly calculated assumedSize. Since there might be items to clear, the newly calculated size should have no effect on whether we clear the items or not. This check is not present in the DataCommunicator counterpart within the method collectChangesToSend. This PR removes the aforementioned clear condition. Add test to ensure that the expanded children are cleared properly when filtered out. Fixes #4132 Co-authored-by: Ugur Saglam <[email protected]>
For hierarchical data, even when the child components are filtered out, the clear method on ArrayUpdater.Update in HierarchicalCommunicationController is never called. This is caused by an if check, in which the start index of previousActive is compared to the newly calculated assumedSize. Since there might be items to clear, the newly calculated size should have no effect on whether we clear the items or not. This check is not present in the DataCommunicator counterpart within the method collectChangesToSend. This PR removes the aforementioned clear condition. Add test to ensure that the expanded children are cleared properly when filtered out. Fixes #4132 Co-authored-by: Ugur Saglam <[email protected]>
For hierarchical data, even when the child components are filtered out, the clear method on ArrayUpdater.Update in HierarchicalCommunicationController is never called. This is caused by an if check, in which the start index of previousActive is compared to the newly calculated assumedSize. Since there might be items to clear, the newly calculated size should have no effect on whether we clear the items or not. This check is not present in the DataCommunicator counterpart within the method collectChangesToSend. This PR removes the aforementioned clear condition. Add test to ensure that the expanded children are cleared properly when filtered out. Fixes #4132 Co-authored-by: Ugur Saglam <[email protected]>
This ticket/PR has been released with Vaadin 23.2.11. |
This ticket/PR has been released with Vaadin 22.0.25. |
This ticket/PR has been released with Vaadin 14.9.3. |
This ticket/PR has been released with Vaadin 24.0.0.alpha6 and is also targeting the upcoming stable 24.0.0 version. |
For hierarchical data, even when the child components are filtered out, the clear method on ArrayUpdater.Update in HierarchicalCommunicationController is never called. This is caused by an if check, in which the start index of previousActive is compared to the newly calculated assumedSize. Since there might be items to clear, the newly calculated size should have no effect on whether we clear the items or not. This check is not present in the DataCommunicator counterpart within the method collectChangesToSend. This PR removes the aforementioned clear condition. Add test to ensure that the expanded children are cleared properly when filtered out. Fixes #4132
Added primitive checking on event data value decoding, so that primitive values get default values instead of null.
Fixes issue #4112
This change is