mirror of https://github.com/apache/jclouds.git
allow null/missing for varargs params (needed e.g. for EC2 ElasticBlockStoreAsyncClient.describeVolumesInRegion)
This commit is contained in:
parent
c597e079d5
commit
975768bcb2
|
@ -969,6 +969,10 @@ public class RestAnnotationProcessor<T> {
|
|||
throw new IllegalArgumentException("Argument index "+(entry.getKey()+1)+" is out of bounds for method "+request.getJavaMethod());
|
||||
}
|
||||
|
||||
if (request.getJavaMethod().isVarArgs() && entry.getKey() + 1 == request.getJavaMethod().getParameterTypes().length)
|
||||
//allow null/missing for var args
|
||||
continue OUTER;
|
||||
|
||||
Annotation[] annotations = request.getJavaMethod().getParameterAnnotations()[entry.getKey()];
|
||||
for (Annotation a: annotations) {
|
||||
if (Nullable.class.isAssignableFrom(a.annotationType()))
|
||||
|
|
Loading…
Reference in New Issue