FYI, see related issue report:

"Generics unusable as return type"
http://restlet.tigris.org/issues/show_bug.cgi?id=686 
 
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


-----Message d'origine-----
De : [email protected] [mailto:[email protected]] 
Envoyé : samedi 28 février 2009 18:08
À : [email protected]
Objet : Problem with returning generic generic types in JAX-RS

Hi Jürgen,

sorry, that it takes a long time for your problem with returning generic
objects. Do you used the following?

List<String> strings = ...
GenericEntity<List<String>> entity = new
GenericEntity<List<String>>(strings) {}; return Response.ok(entity).build();


directly evaluation of List<String> generally does not work in Java. So the
GenericEntity was created in JAX-RS. There was a discussion in the JAX-RS
mailing lists about this, see
https://jsr311.dev.java.net/servlets/SearchList?list=users&searchText=Generi
cEntity&defaultField=body&Search=Search
<https://jsr311.dev.java.net/servlets/SearchList?list=users&searchText=Gener
icEntity&defaultField=body&Search=Search>
and
https://jsr311.dev.java.net/servlets/SearchList?list=dev&searchText=GenericE
ntity&defaultField=body&Search=Search
<https://jsr311.dev.java.net/servlets/SearchList?list=dev&searchText=Generic
Entity&defaultField=body&Search=Search>

best regards
   Stephan

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=12456
48

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1296659

Reply via email to