fixed post binder param

git-svn-id: http://jclouds.googlecode.com/svn/trunk@2271 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
adrian.f.cole 2009-11-12 21:52:48 +00:00
parent 633a38b502
commit aa1dd2009b
1 changed files with 7 additions and 6 deletions

View File

@ -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;