{"action":"closed","issue":{"url":"https://api.github.com/repos/perwendel/spark/issues/416","repository_url":"https://api.github.com/repos/perwendel/spark","labels_url":"https://api.github.com/repos/perwendel/spark/issues/416/labels{/name}","comments_url":"https://api.github.com/repos/perwendel/spark/issues/416/comments","events_url":"https://api.github.com/repos/perwendel/spark/issues/416/events","html_url":"https://github.com/perwendel/spark/issues/416","id":121576534,"number":416,"title":"add route without keyword \"return\" .","user":{"login":"qwIvan","id":7613160,"avatar_url":"https://avatars.githubusercontent.com/u/7613160?v=3","gravatar_id":"","url":"https://api.github.com/users/qwIvan","html_url":"https://github.com/qwIvan","followers_url":"https://api.github.com/users/qwIvan/followers","following_url":"https://api.github.com/users/qwIvan/following{/other_user}","gists_url":"https://api.github.com/users/qwIvan/gists{/gist_id}","starred_url":"https://api.github.com/users/qwIvan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qwIvan/subscriptions","organizations_url":"https://api.github.com/users/qwIvan/orgs","repos_url":"https://api.github.com/users/qwIvan/repos","events_url":"https://api.github.com/users/qwIvan/events{/privacy}","received_events_url":"https://api.github.com/users/qwIvan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-10T21:02:07Z","updated_at":"2016-05-04T20:33:35Z","closed_at":"2016-05-04T20:33:35Z","body":"I am try to add a feature that allow developer can add a route without keyword \"return\" .\r\nhttps://github.com/perwendel/spark/compare/master...qwIvan:feature_router_without_return\r\nexample code:\r\n```java\r\nget(\"/simple\",(request, response) -> {\r\n    response.body(\"Simple\");\r\n});\r\n```\r\nbut these are some problem in lambda block that only contain code with throw exception, like:\r\n```java\r\nget(\"/simple\",(request, response) -> {\r\n    throw new RuntimeException();\r\n});\r\n```\r\nI was get a warning message from Intellij IDEA:\r\n> Ambiguaus method call. Both\r\nmy solution is add a condition before throw:\r\n```java\r\nget(\"/simple\",(request, response) -> {\r\n    if (true)\r\n        throw new RuntimeException();\r\n});\r\n```\r\n\r\nbut it is not elegant at all."}}