String constructor to support JAX-RS
Project moved to GitHub
Brought to you by:
broneill,
scolebourne
According to the JAX-RS specification (Chapter 3.2 Fields and Bean Properties):
Valid parameter types for each of the above annotations are listed in the corresponding Javadoc, however in
general (excluding @Context) the following types are supported:
Unfortunately, the Joda DateTime(Object) constructor does not satisfy this requirement, so we cannot have Joda DateTime query parameters in our RESTful services.
Suggested Fix:
Overload DateTime constructor with DateTime(String)
JAX-RS Spec available here:
http://download.oracle.com/otndocs/jcp/jaxrs-1.1-mrel-eval-oth-JSpec/
Joda-Time v2.0 now has a parse(String) factory. Hopefully a future revision of JAX-RS will utilise that naming pattern, or something like Joda-Convert. In the meantime, you'll need to write a plugin to your JAX-RS provider.