[jboss-jira] [JBoss JIRA] (WFLY-12192) Support for java.util.Optional on PathParam and QueryParam

Weinan Li (Jira) issues at jboss.org
Fri Jun 14 00:31:00 EDT 2019


     [ https://issues.jboss.org/browse/WFLY-12192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Weinan Li moved RESTEASY-2276 to WFLY-12192:
--------------------------------------------

          Project: WildFly  (was: RESTEasy)
              Key: WFLY-12192  (was: RESTEASY-2276)
         Workflow: GIT Pull Request workflow   (was: classic default workflow)
      Component/s: REST
                       (was: jaxrs)
    Fix Version/s:     (was: 4.1.0.Final)
                       (was: 3.8.0.Final)


> Support for java.util.Optional on PathParam and QueryParam
> ----------------------------------------------------------
>
>                 Key: WFLY-12192
>                 URL: https://issues.jboss.org/browse/WFLY-12192
>             Project: WildFly
>          Issue Type: Feature Request
>          Components: REST
>            Reporter: Claudio Tagliola
>            Assignee: Weinan Li
>            Priority: Major
>
> Currently, PathParam and QueryParam support the following construct (from https://docs.jboss.org/resteasy/docs/3.0.17.Final/userguide/html_single/#_PathParam):
> {quote}The parameter type you inject into can be any primitive type, a String, or any Java object that has a constructor that takes a String parameter, or a static valueOf method that takes a String as a parameter.{quote}
> Proposal is to also support java.util.Optional.ofNullable as a wrapper object for Strings, which is always called. This will eliminate all null checks for optional parameters in resource classes with the different Optional followup methods, such as optional.ifPresent.



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list