{"action":"created","issue":{"url":"https://api.github.com/repos/vaadin/flow/issues/4003","repository_url":"https://api.github.com/repos/vaadin/flow","labels_url":"https://api.github.com/repos/vaadin/flow/issues/4003/labels{/name}","comments_url":"https://api.github.com/repos/vaadin/flow/issues/4003/comments","events_url":"https://api.github.com/repos/vaadin/flow/issues/4003/events","html_url":"https://github.com/vaadin/flow/pull/4003","id":317617856,"number":4003,"title":"Simplify HasValue","user":{"login":"Legioth","id":1294657,"avatar_url":"https://avatars2.githubusercontent.com/u/1294657?v=4","gravatar_id":"","url":"https://api.github.com/users/Legioth","html_url":"https://github.com/Legioth","followers_url":"https://api.github.com/users/Legioth/followers","following_url":"https://api.github.com/users/Legioth/following{/other_user}","gists_url":"https://api.github.com/users/Legioth/gists{/gist_id}","starred_url":"https://api.github.com/users/Legioth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Legioth/subscriptions","organizations_url":"https://api.github.com/users/Legioth/orgs","repos_url":"https://api.github.com/users/Legioth/repos","events_url":"https://api.github.com/users/Legioth/events{/privacy}","received_events_url":"https://api.github.com/users/Legioth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Legioth","id":1294657,"avatar_url":"https://avatars2.githubusercontent.com/u/1294657?v=4","gravatar_id":"","url":"https://api.github.com/users/Legioth","html_url":"https://github.com/Legioth","followers_url":"https://api.github.com/users/Legioth/followers","following_url":"https://api.github.com/users/Legioth/following{/other_user}","gists_url":"https://api.github.com/users/Legioth/gists{/gist_id}","starred_url":"https://api.github.com/users/Legioth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Legioth/subscriptions","organizations_url":"https://api.github.com/users/Legioth/orgs","repos_url":"https://api.github.com/users/Legioth/repos","events_url":"https://api.github.com/users/Legioth/events{/privacy}","received_events_url":"https://api.github.com/users/Legioth/received_events","type":"User","site_admin":false},"assignees":[{"login":"Legioth","id":1294657,"avatar_url":"https://avatars2.githubusercontent.com/u/1294657?v=4","gravatar_id":"","url":"https://api.github.com/users/Legioth","html_url":"https://github.com/Legioth","followers_url":"https://api.github.com/users/Legioth/followers","following_url":"https://api.github.com/users/Legioth/following{/other_user}","gists_url":"https://api.github.com/users/Legioth/gists{/gist_id}","starred_url":"https://api.github.com/users/Legioth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Legioth/subscriptions","organizations_url":"https://api.github.com/users/Legioth/orgs","repos_url":"https://api.github.com/users/Legioth/repos","events_url":"https://api.github.com/users/Legioth/events{/privacy}","received_events_url":"https://api.github.com/users/Legioth/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-04-25T13:01:13Z","updated_at":"2018-04-26T10:00:53Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/vaadin/flow/pulls/4003","html_url":"https://github.com/vaadin/flow/pull/4003","diff_url":"https://github.com/vaadin/flow/pull/4003.diff","patch_url":"https://github.com/vaadin/flow/pull/4003.patch"},"body":"* Remove default implementations that require a component instance\r\n* Remove interface methods that are only needed for the removed default\r\nimplementations\r\n* Change ValueChangeEvent to an interface and a separate component event\r\nimplementation\r\n* Simplify HasValue generics to not not depend on the component type\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/vaadin/flow/4003)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/vaadin/flow/issues/comments/384584309","html_url":"https://github.com/vaadin/flow/pull/4003#issuecomment-384584309","issue_url":"https://api.github.com/repos/vaadin/flow/issues/4003","id":384584309,"user":{"login":"Legioth","id":1294657,"avatar_url":"https://avatars2.githubusercontent.com/u/1294657?v=4","gravatar_id":"","url":"https://api.github.com/users/Legioth","html_url":"https://github.com/Legioth","followers_url":"https://api.github.com/users/Legioth/followers","following_url":"https://api.github.com/users/Legioth/following{/other_user}","gists_url":"https://api.github.com/users/Legioth/gists{/gist_id}","starred_url":"https://api.github.com/users/Legioth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Legioth/subscriptions","organizations_url":"https://api.github.com/users/Legioth/orgs","repos_url":"https://api.github.com/users/Legioth/repos","events_url":"https://api.github.com/users/Legioth/events{/privacy}","received_events_url":"https://api.github.com/users/Legioth/received_events","type":"User","site_admin":false},"created_at":"2018-04-26T10:00:53Z","updated_at":"2018-04-26T10:00:53Z","author_association":"MEMBER","body":"\n\n\n\nReview status: 16 of 22 files reviewed at latest revision, 9 unresolved discussions, some commit checks failed.\n\n---\n\n*[flow-data/src/main/java/com/vaadin/flow/data/binder/Binder.java, line 973 at r2](https://reviewable.io/reviews/vaadin/flow/4003#-LB-foEN3nR9Ol3u5Pc4:-LB0Nn0L61kptpM3eig4:b-b65zxj) ([raw file](https://github.com/vaadin/flow/blob/5ffb9a462a5992b1211a2758f3db775a7c243674/flow-data/src/main/java/com/vaadin/flow/data/binder/Binder.java#L973)):*\n<details><summary><i>Previously, denis-anisimov (Denis) wrote…</i></summary><blockquote>\n\n> ```\n> event -> handleFieldValueChange(event)\n> ```\n\nIs it necessary to change the method reference to this lambda with changes in `addValueChangeListener` ?\n</blockquote></details>\n\nWithout this change, there are lots of `java.lang.invoke.LambdaConversionException: Type mismatch for lambda argument 0: class java.lang.Object is not convertible to interface com.vaadin.flow.component.HasValue$ValueChangeEvent` from various tests.\n\n---\n\n*[flow-server/src/main/java/com/vaadin/flow/component/HasValue.java, line 194 at r2](https://reviewable.io/reviews/vaadin/flow/4003#-LB-iYXw46Q3ue-bqkIX:-LB0O8YH6mugljeHgoD5:bamk3is) ([raw file](https://github.com/vaadin/flow/blob/abaf893f2e056ce8185356ebadc67b76649a2ca1/flow-server/src/main/java/com/vaadin/flow/component/HasValue.java#L194)):*\n<details><summary><i>Previously, denis-anisimov (Denis) wrote…</i></summary><blockquote>\n\n> ```\n>         return getComponent().getElement().addPropertyChangeListener(\n>                 getClientValuePropertyName(), event -> {\n>                     /*\n>                      * For the state tree, the default empty value of any\n>                      * property is {@code null}, but for any component it might\n>                      * be something else as defined by {@link #getEmptyValue()}.\n>                      * (#3496)\n>                      */\n>                     final V oldValue;\n>                     final V emptyValue = getEmptyValue();\n>                     final V propertyChangeEventValue = (V) event.getOldValue();\n>                     if (propertyChangeEventValue == null) {\n>                         oldValue = emptyValue;\n>                         if (Objects.equals(oldValue, getValue())) {\n>                             // there is no value change in component API\n>                             // perspective\n>                             return;\n>                         }\n>                     } else {\n>                         oldValue = propertyChangeEventValue;\n>                     }\n>                     listener.onComponentEvent(\n>                             new ValueChangeEvent<>(getComponent(), this,\n>                                     oldValue, event.isUserOriginated()));\n>  \n>                 });\n> ```\n\nIs this part just lost from the implementation ? (not moved anywhere)\n</blockquote></details>\n\nHandled in a better way through `AbstractFieldSupport.setValue` that has been implemented separately\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io/reviews/vaadin/flow/4003)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"Legioth"}}