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()) {
|
switch (request.getMethod()) {
|
||||||
case POST:
|
case POST:
|
||||||
case PUT:
|
case PUT:
|
||||||
MapEntityBinder mapBinder = null;
|
MapEntityBinder mapBinder = getMapEntityBinderOrNull(method, args);
|
||||||
Map<String, String> mapParams = buildPostParams(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 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
|
// MapEntityBinder is also an EntityBinder. If so, it can be used with or without
|
||||||
// parameters.
|
// parameters.
|
||||||
if (mapParams.size() > 0
|
if (mapBinder != null) {
|
||||||
&& (mapBinder = this.getMapEntityBinderOrNull(method, args)) != null) {
|
|
||||||
mapBinder.addEntityToRequest(mapParams, request);
|
mapBinder.addEntityToRequest(mapParams, request);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue