Hi,
I'm seeing an intermittent problem where I get a NPE at JAXRSUtils:513:
List<String> results = values.get(parameterName);
if (values != null && values.size() > 0) {
result = results.get(results.size() - 1); <<<<<<<<<<<<<<<<<<here
}
I've stepped through the code and it looks like its going to work but
then it goes round a second time and results is NULL. Here's my class:
@Path(value="/{domain}/{network}/{user}/mail")
public class MailService {
@GET
@ConsumeMime({"application/xml", "application/json"})
@ProduceMime({"application/xml", "application/json"})
public MailFolderDocument listMail(@PathParam("domain")String domain,
@PathParam("network")String network, @PathParam("user")String user,
@HeaderParam("token")String token){
....
}
@Path(value="{messageId}", limited=true)
@GET
@ConsumeMime({"application/xml", "application/json"})
@ProduceMime({"application/xml", "application/json"})
public MessageDocument readMessage(@PathParam("user")String user,
@PathParam("messageId")String messageId, @HeaderParam("token")String
token){
....
}
}
When I hit http://localhost:8080/cxf/rest/test/domain/network/brad/mail
it hits the breakpoint and in the variables I can see path="/" and
parameterName=""user". It then hits that line again and this time
path="/", parameterName="messageId" and results=null.
I'm assuming there's something not quite right with my annotations
which is causing it to mix the methods up?
Thanks,
Brad.