{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-hateoas/issues/373","labels_url":"https://api.github.com/repos/spring-projects/spring-hateoas/issues/373/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-hateoas/issues/373/comments","events_url":"https://api.github.com/repos/spring-projects/spring-hateoas/issues/373/events","html_url":"https://github.com/spring-projects/spring-hateoas/issues/373","id":99636680,"number":373,"title":"Support for java 8 optional method parameters","user":{"login":"mogronalol","id":7673008,"avatar_url":"https://avatars.githubusercontent.com/u/7673008?v=3","gravatar_id":"","url":"https://api.github.com/users/mogronalol","html_url":"https://github.com/mogronalol","followers_url":"https://api.github.com/users/mogronalol/followers","following_url":"https://api.github.com/users/mogronalol/following{/other_user}","gists_url":"https://api.github.com/users/mogronalol/gists{/gist_id}","starred_url":"https://api.github.com/users/mogronalol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mogronalol/subscriptions","organizations_url":"https://api.github.com/users/mogronalol/orgs","repos_url":"https://api.github.com/users/mogronalol/repos","events_url":"https://api.github.com/users/mogronalol/events{/privacy}","received_events_url":"https://api.github.com/users/mogronalol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-07T12:12:18Z","updated_at":"2015-08-24T19:31:48Z","closed_at":null,"body":"Something like:\r\n\r\n```\r\n@RequestMapping(\"/someurl\")\r\npublic Object foo(@RequestParam final Optional<String> optionalParameter)\r\n```\r\n\r\nI 'd expect this to produce ` /someurl`\r\n\r\n```\r\nlinkTo(methodOn(Controller.class).foo(Optional.empty())).withSelfRel()\r\n```\r\n\r\nAnd for this to produce `/someurl?optionalParameter=bar`\r\n\r\n```\r\nlinkTo(methodOn(Controller.class).foo(Optional.of(\"bar\"))).withSelfRel()\r\n```\r\n\r\nCurrently you get an exception, because it looks like there is no `Converter` implementation that supports Optionals. "},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-hateoas/issues/comments/134349393","html_url":"https://github.com/spring-projects/spring-hateoas/issues/373#issuecomment-134349393","issue_url":"https://api.github.com/repos/spring-projects/spring-hateoas/issues/373","id":134349393,"user":{"login":"vlfors","id":5235113,"avatar_url":"https://avatars.githubusercontent.com/u/5235113?v=3","gravatar_id":"","url":"https://api.github.com/users/vlfors","html_url":"https://github.com/vlfors","followers_url":"https://api.github.com/users/vlfors/followers","following_url":"https://api.github.com/users/vlfors/following{/other_user}","gists_url":"https://api.github.com/users/vlfors/gists{/gist_id}","starred_url":"https://api.github.com/users/vlfors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlfors/subscriptions","organizations_url":"https://api.github.com/users/vlfors/orgs","repos_url":"https://api.github.com/users/vlfors/repos","events_url":"https://api.github.com/users/vlfors/events{/privacy}","received_events_url":"https://api.github.com/users/vlfors/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T19:31:48Z","updated_at":"2015-08-24T19:31:48Z","body":"I think that problem not in \"spring-hateoas\". I'm have used \"Optional\" and in result got error. \r\n```java\r\norg.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type @org.springframework.web.bind.annotation.RequestParam java.util.Optional<java.lang.String> to type java.lang.String\r\n\tat org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:313)\r\n\tat org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:195)\r\n\tat org.springframework.hateoas.mvc.AnnotatedParametersParameterAccessor$BoundMethodParameter.asString(AnnotatedParametersParameterAccessor.java:172)\r\n\tat org.springframework.hateoas.mvc.ControllerLinkBuilderFactory.linkTo(ControllerLinkBuilderFactory.java:141)\r\n\tat org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo(ControllerLinkBuilder.java:135)\r\n\tat hello.GreetingController.foo(GreetingController.java:33)\r\n```\r\nFunction \r\n```java\r\npublic String asString() {\r\n\t\t\tif (value == null) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\treturn (String) CONVERSION_SERVICE.convert(value, parameterTypeDecsriptor, STRING_DESCRIPTOR);\r\n\t\t}\r\n```\r\nError in metod CONVERSIONSERVICE.convert(value, parameterTypeDecsriptor, STRING DESCRIPTOR) of package org.springframework.core.convert.support;\r\n\r\nErrors shown while in debug mode \r\n```java\r\nprotected GenericConverter getConverter (TypeDescriptor sourceType, TypeDescriptor targetType) \r\nconverter = this.converters.find(sourceType, targetType); //ln. 257 \r\n  \r\n```\r\npackage org.springframework.core.convert.support;\r\nnot found converter\r\n"}}