{"action":"created","issue":{"url":"https://api.github.com/repos/FluentLenium/FluentLenium/issues/179","repository_url":"https://api.github.com/repos/FluentLenium/FluentLenium","labels_url":"https://api.github.com/repos/FluentLenium/FluentLenium/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/FluentLenium/FluentLenium/issues/179/comments","events_url":"https://api.github.com/repos/FluentLenium/FluentLenium/issues/179/events","html_url":"https://github.com/FluentLenium/FluentLenium/issues/179","id":110433608,"number":179,"title":"Java 8","user":{"login":"Toilal","id":1165758,"avatar_url":"https://avatars.githubusercontent.com/u/1165758?v=3","gravatar_id":"","url":"https://api.github.com/users/Toilal","html_url":"https://github.com/Toilal","followers_url":"https://api.github.com/users/Toilal/followers","following_url":"https://api.github.com/users/Toilal/following{/other_user}","gists_url":"https://api.github.com/users/Toilal/gists{/gist_id}","starred_url":"https://api.github.com/users/Toilal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Toilal/subscriptions","organizations_url":"https://api.github.com/users/Toilal/orgs","repos_url":"https://api.github.com/users/Toilal/repos","events_url":"https://api.github.com/users/Toilal/events{/privacy}","received_events_url":"https://api.github.com/users/Toilal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/FluentLenium/FluentLenium/labels/feature","name":"feature","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/FluentLenium/FluentLenium/milestones/3","html_url":"https://github.com/FluentLenium/FluentLenium/milestones/3.0","labels_url":"https://api.github.com/repos/FluentLenium/FluentLenium/milestones/3/labels","id":1501616,"number":3,"title":"3.0","description":"Java8 support","creator":{"login":"Toilal","id":1165758,"avatar_url":"https://avatars.githubusercontent.com/u/1165758?v=3","gravatar_id":"","url":"https://api.github.com/users/Toilal","html_url":"https://github.com/Toilal","followers_url":"https://api.github.com/users/Toilal/followers","following_url":"https://api.github.com/users/Toilal/following{/other_user}","gists_url":"https://api.github.com/users/Toilal/gists{/gist_id}","starred_url":"https://api.github.com/users/Toilal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Toilal/subscriptions","organizations_url":"https://api.github.com/users/Toilal/orgs","repos_url":"https://api.github.com/users/Toilal/repos","events_url":"https://api.github.com/users/Toilal/events{/privacy}","received_events_url":"https://api.github.com/users/Toilal/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2016-01-12T08:51:57Z","updated_at":"2016-10-02T05:21:37Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-10-08T12:00:04Z","updated_at":"2016-10-02T05:26:31Z","closed_at":null,"body":"As you know, java 8 brings great features like lambdas and streams API. I'm currently working with FluentLenium in a Java 8 project.\r\n\r\nI have two ideas to make FluentLenium more java 8 compliant ...\r\n\r\n1) **The easy one**: Avoid all ambiguities in functionnal interface parameters.\r\n\r\n```java\r\nFluentWebElement myElement = ...;\r\nawait().until((until) -> myElement.isEnabled());\r\n// Great ! Java 8, lambdas ! It's really readable ! :)\r\n```\r\n\r\nCool stuff ! But actually it doesn't compile :(.\r\n\r\nBecause await() object has ambiguous methods for using lambdas.\r\n- **<T> T until(Function<? super F, T> isTrue)**\r\n- **until(Predicate<Fluent> isTrue)** {\r\n\r\nSo currently, it requires a cast to clarify the ambiguity.\r\n\r\n```java\r\nFluentWebElement myElement = ...;\r\nawait().until((com.google.common.base.Predicate<Fluent>)(until) -> myElement.isEnabled());\r\n// So sad ... :(\r\n```\r\n\r\n=> *Solution*: rename until(Predicate) by untilTrue(Predicate) or something like that ...\r\n\r\n2) **The hard one**: Most of Guava APIs are useless when working with java 8.\r\n\r\nBecause it duplicates what's inside JDK java `java.util.function` package.\r\n\r\n=> *Solution*: extract guava related features in a distinct `fluentlenium-guava` module ...\r\n - `fluentlenium-core`, containing everything common ...\r\n - `fluentlenium-guava` for JDK<8 users.\r\n - `fluentlenium-java8` for JDK>=8 users.\r\n\r\nIt's probably a lot of work, with many factories to introduce, but it would be great to achieve this ...\r\n\r\n<!---\r\n@huboard:{\"milestone_order\":179.0}\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/FluentLenium/FluentLenium/issues/comments/250954579","html_url":"https://github.com/FluentLenium/FluentLenium/issues/179#issuecomment-250954579","issue_url":"https://api.github.com/repos/FluentLenium/FluentLenium/issues/179","id":250954579,"user":{"login":"filipcynarski","id":6398578,"avatar_url":"https://avatars.githubusercontent.com/u/6398578?v=3","gravatar_id":"","url":"https://api.github.com/users/filipcynarski","html_url":"https://github.com/filipcynarski","followers_url":"https://api.github.com/users/filipcynarski/followers","following_url":"https://api.github.com/users/filipcynarski/following{/other_user}","gists_url":"https://api.github.com/users/filipcynarski/gists{/gist_id}","starred_url":"https://api.github.com/users/filipcynarski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipcynarski/subscriptions","organizations_url":"https://api.github.com/users/filipcynarski/orgs","repos_url":"https://api.github.com/users/filipcynarski/repos","events_url":"https://api.github.com/users/filipcynarski/events{/privacy}","received_events_url":"https://api.github.com/users/filipcynarski/received_events","type":"User","site_admin":false},"created_at":"2016-10-02T05:26:31Z","updated_at":"2016-10-02T05:26:31Z","body":"@Toilal I think we do not need to support Java 7. Neither create fluentlenium-guava module all classes compiled w/ Java 8 won't work on earlier versions. So it will simplify 2nd task. It is a result of dropping Java 7 by Selenium 3.  "}}
{"actor":{"display_login":"filipcynarski"}}