users@jsr311.java.net

Failure in either specification or RI

From: Markus KARG <markus.karg_at_gmx.net>
Date: Sun, 15 Jun 2008 19:41:00 +0200

Dear Sirs,

Reviewing the JSR311 Public Review Draft (April 18, 2008) I found this text:

@HttpMethod(GET) 5
2 @ProduceMime{"text/plain"} 6
3 public String listHeaderNames(@Context HttpHeaders headers) { 7
4 StringBuilder buf = new StringBuilder(); 8
5 for (String header: headers.getRequestHeaders().keySet()) { 9
6 buf.append(header); 10
7 buf.append("\n"); 11
8 } 12
9 return buf.toString(); 13
10 }

People might assume that they can use @HttpMethod to annotate a method.
In fact, this is not possible using the current RI. The API definition
of the @HttpMethod prohibits its use at a method. Only annotations can
be annotated using @HttpMethod.

So this is either a failure in the spec draft or in the RI.

Regards
Markus Karg

-- 
http://www.xing.com/go/invita/58469