quarkusio/quarkus · error · IllegalArgumentException

not supported yet

Error message

not supported yet

What it means

When expanding an array-typed parameter into query/path parameters, Quarkus supports String wrappers and certain primitives (int, long, boolean, etc. via ToObjectArray). An array whose component type is some other object type or unhandled primitive falls into this 'not supported yet' branch and fails generation.

Source

Thrown at extensions/resteasy-reactive/rest-client-jaxrs/deployment/src/main/java/io/quarkus/jaxrs/client/reactive/deployment/JaxrsClientReactiveProcessor.java:3346

                                paramHandle);
                    } else if (primitiveType == PrimitiveType.LONG) {
                        componentType = DotNames.LONG.toString();
                        paramArray = notNullParam.invokeStaticMethod(
                                MethodDescriptor.ofMethod(ToObjectArray.class, "primitiveArray", Long[].class, long[].class),
                                paramHandle);
                    } else if (primitiveType == PrimitiveType.SHORT) {
                        componentType = DotNames.SHORT.toString();
                        paramArray = notNullParam.invokeStaticMethod(
                                MethodDescriptor.ofMethod(ToObjectArray.class, "primitiveArray", Short[].class, short[].class),
                                paramHandle);
                    } else if (primitiveType == PrimitiveType.BOOLEAN) {
                        componentType = DotNames.BOOLEAN.toString();
                        paramArray = notNullParam.invokeStaticMethod(
                                MethodDescriptor.ofMethod(ToObjectArray.class, "primitiveArray", Boolean[].class,
                                        boolean[].class),
                                paramHandle);
                    } else {
                        throw new IllegalArgumentException("not supported yet");
                    }
                } else {
                    componentType = constituentType.name().toString();
                    paramArray = notNullParam.checkCast(paramHandle, Object[].class);
                }
            } else if (isCollection(type, index)) {
                if (type.kind() == PARAMETERIZED_TYPE) {
                    Type paramType = type.asParameterizedType().arguments().get(0);
                    if ((paramType.kind() == CLASS) || (paramType.kind() == PARAMETERIZED_TYPE)) {
                        componentType = paramType.name().toString();
                    }
                }
                if (componentType == null) {
                    componentType = DotNames.OBJECT.toString();
                }
                paramArray = notNullParam.invokeStaticMethod(
                        MethodDescriptor.ofMethod(ToObjectArray.class, "collection", Object[].class, Collection.class),
                        paramHandle);

View on GitHub (pinned to e1c734241f)

Solutions

  1. Convert the array to String[] (or List<String>) before passing, formatting elements yourself
  2. Use a supported component type (String, Integer, Long, Boolean, primitives in the supported set)
  3. Register a custom ParamConverter and pass a single String value instead of an array

Example fix

// before
@GET
List<Item> byIds(UUID[] ids);
// after
@GET
List<Item> byIds(List<String> ids); // convert UUIDs to strings at call site
Defensive patterns

Strategy: validation

Validate before calling

static void validateArrayParams(Class<?> client) throws Exception {
    java.util.Set<Class<?>> ok = java.util.Set.of(
        String.class, Integer.class, Long.class, Boolean.class,
        int.class, long.class, boolean.class, short.class, byte.class, char.class, float.class, double.class);
    for (var m : client.getDeclaredMethods()) {
        for (var p : m.getParameters()) {
            if (p.getType().isArray() && !ok.contains(p.getType().getComponentType())) {
                throw new IllegalArgumentException(m + ": array param of "
                    + p.getType().getComponentType() + " unsupported; use List<String> or convert");
            }
        }
    }
}

Type guard

static boolean isSupportedArrayParam(Class<?> t) {
    if (!t.isArray()) return true;
    Class<?> c = t.getComponentType();
    return c == String.class || c == Integer.class || c == Long.class
        || c == Boolean.class || c.isPrimitive();
}

Prevention

When it happens

Trigger: Passing e.g. UUID[], LocalDate[], BigDecimal[] (or a primitive array not in the supported set) as a query/path parameter on a REST client method.

Common situations: Trying to pass arrays of value objects as repeated query parameters; newer JDK or API types (records, Optional[]) used directly as parameters.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/46901cc11efb0fa7. Report an issue: GitHub.