mirror of https://github.com/apache/jclouds.git
Issue 76: allow map binders to work without args in rare cases where there are no parameters, but a request body is needed
git-svn-id: http://jclouds.googlecode.com/svn/trunk@1833 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
2436c68578
commit
3571be7a16
|
@ -393,13 +393,12 @@ public class JaxrsAnnotationProcessor {
|
|||
switch (request.getMethod()) {
|
||||
case POST:
|
||||
case PUT:
|
||||
MapEntityBinder mapBinder = null;
|
||||
MapEntityBinder mapBinder = getMapEntityBinderOrNull(method, args);
|
||||
Map<String, String> mapParams = buildPostParams(method, args);
|
||||
// MapEntityBinder is only useful if there are parameters. We guard here in case the
|
||||
// MapEntityBinder is also an EntityBinder. If so, it can be used with or without
|
||||
// parameters.
|
||||
if (mapParams.size() > 0
|
||||
&& (mapBinder = this.getMapEntityBinderOrNull(method, args)) != null) {
|
||||
if (mapBinder != null) {
|
||||
mapBinder.addEntityToRequest(mapParams, request);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue