Hi Jerome-

We just updated to trunk (revision 6751), and many of our annotated
@Post methods in our application have stopped working!

Based on commit comments, the relevant changes are sometime in the
last 24 hours (revisions 6744 and 6745) made to AnnotationInfo.java,
where your comment was:
      - When selecting an annotated method, if the request has an
        available entity, now the Java methods without an input
        parameter are rejected.

Throughout our current project, we have many annotated methods that
look like this:

@Post
public void handleSomePost() { // <-- note no params
    doSomethingWithAForm(new Form(getRequest().getEntity()));
    .....
}

This has worked fine for us throughout most of the 2.0 process, and I
haven't seen any documentation that prohibits this.

While I understand the logic behind @Post methods taking a single
parameter representing the request entity body, it's not at all
obvious that a Post handler without any params should be considered
incompatible with a request that contains an entity.  Additionally, it
seems late in the game to change this logic- although if it turns out
that we're the only people using this pattern, then we can certainly
make the adjustment- but I'd recommend documenting the
annotation-processing very thoroughly, especially for this case.

Thanks,
  -Dave Fogel

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

Reply via email to