diff --git a/src/main/java/com/qualys/feign/jaxrs/BeanParamEncoder.java b/src/main/java/com/qualys/feign/jaxrs/BeanParamEncoder.java index 7d80a1d..bc9b68b 100644 --- a/src/main/java/com/qualys/feign/jaxrs/BeanParamEncoder.java +++ b/src/main/java/com/qualys/feign/jaxrs/BeanParamEncoder.java @@ -49,7 +49,7 @@ public void encode(Object object, Type bodyType, RequestTemplate template) throw template.methodMetadata().indexToExpander(new HashMap<>()); boolean resolved = false; - if (object instanceof Object[] objects) { + if (object instanceof Object[] objects && objects.length > 0) { for (Object internalObject : objects) { if (internalObject instanceof EncoderContext ctx) { if (ctx.values.size() == 1 && ctx.values.get(ctx.values.keySet().iterator().next()) instanceof Map map) {