Skip to content
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

Ignore component removal if the component has no parent #4537

Merged
merged 2 commits into from Aug 28, 2018

Conversation

denis-anisimov
Copy link
Contributor

@denis-anisimov denis-anisimov commented Aug 17, 2018

Fixes #4528


This change is Reviewable

Copy link
Contributor

@caalador caalador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 unresolved discussion, 0 of 1 LGTMs obtained


flow-server/src/main/java/com/vaadin/flow/component/HasComponents.java, line 68 at r1 (raw file):

                    "Component to remove cannot be null");
            Element parent = component.getElement().getParent();
            if (parent == null) {

This now fails the UITest.removeNotChildComponent test as it expects an IllegalArgumentException instead of a silent logging of missing parent.

The test should be removed as it is tested in the remove_removeComponentWithNoParent that is close to identical.

Copy link
Contributor

@pekam pekam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 unresolved discussion, 0 of 1 LGTMs obtained


flow-server/src/main/java/com/vaadin/flow/component/HasComponents.java, line 68 at r1 (raw file):

Previously, caalador wrote…

This now fails the UITest.removeNotChildComponent test as it expects an IllegalArgumentException instead of a silent logging of missing parent.

The test should be removed as it is tested in the remove_removeComponentWithNoParent that is close to identical.

Done.

Copy link
Contributor

@caalador caalador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r1, 1 of 1 files at r2.
Reviewable status: all discussions resolved, 0 of 1 LGTMs obtained, and 1 stale

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.

None yet

3 participants