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

Remove deprecated methods from 3.0 #7333

Merged
merged 1 commit into from Jan 15, 2020
Merged

Remove deprecated methods from 3.0 #7333

merged 1 commit into from Jan 15, 2020

Conversation

pleku
Copy link
Contributor

@pleku pleku commented Jan 10, 2020

Removes or hides remaining API that has been made deprecated in 1.0-2.2.
Only exclusion is @VaadinServletConfiguration, which is kept.

Part of #6510


This change is Reviewable

@pleku pleku moved this from External Reviews to Iteration Reviews in OLD Vaadin Flow ongoing work (Vaadin 10+) Jan 10, 2020
Copy link
Contributor

@denis-anisimov denis-anisimov left a comment

Choose a reason for hiding this comment

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

Reviewed 23 of 23 files at r1.
Reviewable status: 2 unresolved discussions, 0 of 1 LGTMs obtained (waiting on @denis-anisimov)


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

VaadinSession.getCurrent().getBrowser().isIPhone();

That should include ipod according to the impl in the master branch for OperatingSystem.IOS https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/shared/BrowserDetails.java#L237

Does it include it now ?


flow-server/src/main/java/com/vaadin/flow/dom/Element.java, line 71 at r1 (raw file):

private 

Any specific reason?
Is it used in other place as well ?
I see some unsafety here: the field is immutable but the value is not.
So would be good to initialize the value to immutable value (and get rid of static block) : use a static method which returns the filled HashMap and wrap it using Collections.unmodifiableMap.

OLD Vaadin Flow ongoing work (Vaadin 10+) automation moved this from Iteration Reviews to Changes Requested Jan 13, 2020
@pleku pleku mentioned this pull request Jan 13, 2020
35 tasks
Copy link
Contributor Author

@pleku pleku 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: 2 unresolved discussions, 0 of 1 LGTMs obtained (waiting on @denis-anisimov)


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

Previously, denis-anisimov (Denis) wrote…
VaadinSession.getCurrent().getBrowser().isIPhone();

That should include ipod according to the impl in the master branch for OperatingSystem.IOS https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/shared/BrowserDetails.java#L237

Does it include it now ?

Very good find. However, I think it is a fluke. I don't think we say anywhere that we would be supporting any iPods though.

I'll verify

Copy link
Contributor Author

@pleku pleku 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: 2 unresolved discussions, 0 of 1 LGTMs obtained (waiting on @denis-anisimov)


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

Previously, pleku (Pekka Hyvönen) wrote…

Very good find. However, I think it is a fluke. I don't think we say anywhere that we would be supporting any iPods though.

I'll verify

Done


flow-server/src/main/java/com/vaadin/flow/dom/Element.java, line 71 at r1 (raw file):

Previously, denis-anisimov (Denis) wrote…
private 

Any specific reason?
Is it used in other place as well ?
I see some unsafety here: the field is immutable but the value is not.
So would be good to initialize the value to immutable value (and get rid of static block) : use a static method which returns the filled HashMap and wrap it using Collections.unmodifiableMap.

Done (was left by a mistake)

Copy link
Contributor

@denis-anisimov denis-anisimov left a comment

Choose a reason for hiding this comment

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

Reviewed 22 of 22 files at r2.
Reviewable status: 1 unresolved discussion, 0 of 1 LGTMs obtained (waiting on @denis-anisimov)


flow-server/src/main/java/com/vaadin/flow/internal/nodefeature/NodeFeatures.java, line 91 at r2 (raw file):

Quoted 5 lines of code…
    public static final int SYNCHRONIZED_PROPERTIES = 13;
    /**
     * Id for {@link SynchronizedPropertyEventsList}.
     */
    public static final int SYNCHRONIZED_PROPERTY_EVENTS = 14;

Technically this removal requires renumeration : COMPONENT_MAPPING is 15 now but should be 13.
I'm not sure how important it is though.

Copy link
Contributor Author

@pleku pleku 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 (waiting on @denis-anisimov)


flow-server/src/main/java/com/vaadin/flow/internal/nodefeature/NodeFeatures.java, line 91 at r2 (raw file):

Previously, denis-anisimov (Denis) wrote…
    public static final int SYNCHRONIZED_PROPERTIES = 13;
    /**
     * Id for {@link SynchronizedPropertyEventsList}.
     */
    public static final int SYNCHRONIZED_PROPERTY_EVENTS = 14;

Technically this removal requires renumeration : COMPONENT_MAPPING is 15 now but should be 13.
I'm not sure how important it is though.

I'm not sure, but I'm a bit afraid that it might break more existing tests on our side and potentially a lot of tests on customers side that for some reason look at the JSON messages.

As I don't know what changing this might cause, I would not just do it as there is practically no added value.

Copy link
Contributor

@denis-anisimov denis-anisimov 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 4 of 4 files at r3.
Reviewable status: :shipit: complete! all discussions resolved, 1 of 1 LGTMs obtained


flow-server/src/main/java/com/vaadin/flow/internal/nodefeature/NodeFeatures.java, line 91 at r2 (raw file):

Previously, pleku (Pekka Hyvönen) wrote…

I'm not sure, but I'm a bit afraid that it might break more existing tests on our side and potentially a lot of tests on customers side that for some reason look at the JSON messages.

As I don't know what changing this might cause, I would not just do it as there is practically no added value.

Well, this is pure internal functionality. I'm pretty sure it can be changed safely without breaking anything.

The reason of my concern here: it might be that we have some assumptions about the index of the feature and their overall number.
So if we have 16 features e.g. but there is a feature whose index (id here) is 17 it may cause a failure.

But on the other hand, I think we should have tests for this. So if nothing failed then it should be OK.

OLD Vaadin Flow ongoing work (Vaadin 10+) automation moved this from Changes Requested to Reviewer approved Jan 14, 2020
Copy link
Contributor Author

@pleku pleku 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, and 1 stale

a discussion (no related file):
Blocking until #7326 is merged and this is rebased on top of it.


Removes or hides remaining API that has been made deprecated in 1.0-2.2.
Only exclusion is @VaadinServletConfiguration, which is kept.

Fixes #6510
@vaadin-bot
Copy link
Collaborator

SonarQube analysis reported 9 issues

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:

  1. MINOR ServiceInitEvent.java#L42: Remove this use of "BootstrapListener"; it is deprecated. rule
  2. MINOR VaadinService.java#L159: Remove this use of "BootstrapListener"; it is deprecated. rule
  3. INFO Instantiator.java#L104: Do not forget to remove this deprecated code someday. rule
  4. INFO BootstrapListener.java#L44: Do not forget to remove this deprecated code someday. rule
  5. INFO BootstrapPageResponse.java#L37: Do not forget to remove this deprecated code someday. rule
  6. INFO PageConfigurator.java#L30: Do not forget to remove this deprecated code someday. rule
  7. INFO PageConfigurator.java#L42: Do not forget to remove this deprecated code someday. rule
  8. INFO ServiceInitEvent.java#L83: Do not forget to remove this deprecated code someday. rule
  9. INFO ServiceInitEvent.java#L146: Do not forget to remove this deprecated code someday. rule

@pleku pleku added the hilla Issues related to Hilla label Jan 15, 2020
Copy link
Member

@manolo manolo 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: all discussions resolved, 0 of 1 LGTMs obtained, and 1 stale (waiting on @denis-anisimov)

Copy link
Member

@manolo manolo 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 14 of 23 files at r1, 21 of 22 files at r2, 4 of 4 files at r3, 3 of 3 files at r4, 3 of 3 files at r5, 16 of 16 files at r6.
Reviewable status: :shipit: complete! all discussions resolved, 1 of 1 LGTMs obtained, and 1 stale

Copy link
Contributor

@denis-anisimov denis-anisimov left a comment

Choose a reason for hiding this comment

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

Just a note :

            getElement().addPropertyChangeListener("value", event, e -> {
            });
            getElement().addEventListener(event, e -> {
                label.setText(
                        "Server value: " + getElement().getProperty("value"));
            });

Looks weird because it's not clear why do we synchronize the "value" property but there is no any listener for it.
The whole idea to have the new method addPropertyChangeListener (with a new signature) was to have a synchronized property along with the listener for it right away (so they are attached).

But here the event listener is added instead of having the property listener .
So the event listener code could have been removed and instead used in the property listener.

It's more a note for myself which explains the unclear usage of empty property listeners.

Reviewed 3 of 3 files at r4, 2 of 3 files at r5, 7 of 16 files at r6.
Reviewable status: :shipit: complete! all discussions resolved, 1 of 1 LGTMs obtained, and 1 stale

Copy link
Contributor

@denis-anisimov denis-anisimov 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 1 of 3 files at r5, 9 of 16 files at r6.
Reviewable status: :shipit: complete! all discussions resolved, 2 of 1 LGTMs obtained

@denis-anisimov denis-anisimov merged commit e2b1141 into ccdm Jan 15, 2020
OLD Vaadin Flow ongoing work (Vaadin 10+) automation moved this from Reviewer approved to Done - pending release Jan 15, 2020
@denis-anisimov denis-anisimov deleted the fix/6510 branch January 15, 2020 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hilla Issues related to Hilla +1.0.0
Projects
OLD Vaadin Flow ongoing work (Vaadin ...
  
Done - pending release
Development

Successfully merging this pull request may close these issues.

None yet

4 participants