dev@jsr311.java.net

Re: more comments to JAX-RS

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Fri, 28 Mar 2008 12:52:21 -0400

>
> is it allowed that a sub resource locator will get the entity
> Object? I found nothing about it in the spec, where the sub resource
> locator is defined. Semanticly it is at least not useful. I think it
> should be forbidden. For some types, e.g. InputStream and Reader it
> will produce trouble.
>
At a minimum we should define that at most one method can get the
entity. I think the easiest way of enforcing that is to disallow
entities as sub-resource locator parameters.

> Until now it is not defined what should happen, if
> UriBuilder.extension(String) will get a null.
> What should UriInfo.getPathExtemsion() return, if no extension was
> available? null or ""? I prefere "". If we use null, we IMO must
> allow UriBuilder.extension(String) to get the null value as parameter.
>
Elsewhere we allow null and it can be used to unset the corresponding
component. Suggest we keep things consistent and allow null to mean
"no extension".

> In the section about Content Negotiation and Preconditions (5.1.3.)
> is a typing error:
> The method request.evaluate(...); was renamed to
> evaluatePRECONDITIONS(...);
> You could also remove the null; a method only for the EntityTag is
> also available.
>
OK.

> Marc, you renamed some method from ...Template... to ...Path... .
> There are a lot of points, where javadoc talk about template
> parameters (I found 44 by searching for "templ").nDo you want to
> change them also, or should it be as it is?
>
I'll take a look but I think most should be OK, the value of an @Path
annotation is a URI template so its OK to talk about URI template
parameters.

Marc.

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.