mirror of https://github.com/apache/jclouds.git
fixed post binder param
git-svn-id: http://jclouds.googlecode.com/svn/trunk@2271 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
633a38b502
commit
aa1dd2009b
|
@ -1069,16 +1069,17 @@ public class RestAnnotationProcessor<T> {
|
|||
for (Entry<Integer, Set<Annotation>> entry : indexToPathParam.entrySet()) {
|
||||
for (Annotation key : entry.getValue()) {
|
||||
Set<Annotation> extractors = indexToParamExtractor.get(entry.getKey());
|
||||
|
||||
String paramKey = ((MapEntityParam) key).value();
|
||||
String paramValue;
|
||||
if (extractors != null && extractors.size() > 0) {
|
||||
ParamParser extractor = (ParamParser) extractors.iterator().next();
|
||||
postParams.put(((PathParam) key).value(), injector.getInstance(extractor.value())
|
||||
.apply(args[entry.getKey()]));
|
||||
paramValue = injector.getInstance(extractor.value()).apply(args[entry.getKey()]);
|
||||
|
||||
} else {
|
||||
String paramKey = ((MapEntityParam) key).value();
|
||||
String paramValue = args[entry.getKey()].toString();
|
||||
postParams.put(paramKey, paramValue);
|
||||
paramValue = args[entry.getKey()].toString();
|
||||
}
|
||||
postParams.put(paramKey, paramValue);
|
||||
|
||||
}
|
||||
}
|
||||
return postParams;
|
||||
|
|
Loading…
Reference in New Issue