{"record":{"id":"4ee1181cf97bad18","repo":"quarkusio/quarkus","slug":"unsupported-map-type-type-name-offending-me","errorCode":null,"errorMessage":"Unsupported Map type '{type.name()}'. Offending method is: {jandexMethod}","messagePattern":"Unsupported Map type '(.+?)'\\. Offending method is: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/resteasy-reactive/rest-client-jaxrs/deployment/src/main/java/io/quarkus/jaxrs/client/reactive/deployment/JaxrsClientReactiveProcessor.java","lineNumber":3414,"sourceCode":"            if (type.kind() != PARAMETERIZED_TYPE) {\n                throw new IllegalArgumentException(\n                        \"Raw Map parameter types are not supported. Offending method is: \" + jandexMethod);\n            }\n            var parameterizedType = type.asParameterizedType();\n            var arguments = parameterizedType.arguments();\n            return new AbstractMap.SimpleEntry<>(arguments.get(0), arguments.get(1));\n        } else if (type.name().equals(ResteasyReactiveDotNames.MULTI_VALUED_MAP)) {\n            if (type.kind() != PARAMETERIZED_TYPE) {\n                throw new IllegalArgumentException(\n                        \"Raw MultivaluedMap parameter types are not supported. Offending method is: \" + jandexMethod);\n            }\n            var parameterizedType = type.asParameterizedType();\n            var arguments = parameterizedType.arguments();\n            return new AbstractMap.SimpleEntry<>(arguments.get(0), ParameterizedType.create(ResteasyReactiveDotNames.LIST,\n                    new Type[] { arguments.get(1) }, null));\n        }\n        // TODO: we could support this if necessary by looking up the resolved types via JandexUtil.resolveTypeParameters\n        throw new IllegalArgumentException(\"Unsupported Map type '\" + type.name() + \"'. Offending method is: \" + jandexMethod);\n    }\n\n    private BranchResult iteratorHasNext(BytecodeCreator creator, ResultHandle iterator) {\n        return creator.ifTrue(\n                creator.invokeInterfaceMethod(ofMethod(Iterator.class, \"hasNext\", boolean.class), iterator));\n    }\n\n    private void addWebTargetParamToWebTarget(BytecodeCreator creator, ResultHandle paramName,\n            ResultHandle webTarget,\n            ResultHandle client, ResultHandle genericType,\n            ResultHandle paramAnnotations, ResultHandle paramArray,\n            String componentType,\n            AssignableResultHandle resultVariable,\n            String webTargetParamMethod,\n            String separator) {\n        ResultHandle convertedParamArray = creator.invokeVirtualMethod(\n                MethodDescriptor.ofMethod(RestClientBase.class, \"convertParamArray\", Object[].class, Object[].class,\n                        Class.class, java.lang.reflect.Type.class, Annotation[].class, String.class),","sourceCodeStart":3396,"sourceCodeEnd":3432,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/resteasy-reactive/rest-client-jaxrs/deployment/src/main/java/io/quarkus/jaxrs/client/reactive/deployment/JaxrsClientReactiveProcessor.java#L3396-L3432","documentation":"The client processor only supports `Map` and `MultivaluedMap` as the map-like parameter type for header/form handling. Any other Map subtype (e.g. `HashMap`, `SortedMap`, or a custom Map implementation) is unsupported because the processor cannot reliably resolve its key/value parameters. Deployment fails with this IllegalArgumentException.","triggerScenarios":"Using a Map subtype such as `HashMap<String, String>` or `TreeMap<String, String>` as a REST client method parameter for headers/form params instead of the exact `Map` or `MultivaluedMap` interface.","commonSituations":"Using a concrete implementation type for convenience; custom Map wrappers to add helper methods; signatures copied from other frameworks that accept subtypes.","solutions":["Change the parameter type to the exact interface `Map<String, String>` (or `MultivaluedMap<String, String>`), keeping subtype instantiation only at the call site","Pass the data as a dedicated POJO/DTO instead of a Map subtype","If truly needed upstream support, this would require Jandex type resolution — currently not implemented (see TODO in processor)"],"exampleFix":"// before\n@POST void send(@HeaderParam(\"h\") HashMap<String, String> headers);\n// after\n@POST void send(@HeaderParam(\"h\") Map<String, String> headers);","handlingStrategy":"validation","validationCode":"Class<?> c = param.getClass(); if (!c.equals(Map.class) && !c.equals(MultivaluedMap.class) && Map.class.isAssignableFrom(c)) throw new IllegalArgumentException(\"Use exact Map or MultivaluedMap interface in REST client signatures\");","typeGuard":"static boolean isSupportedMapType(java.lang.reflect.Type t) { return t.equals(Map.class) || (t instanceof ParameterizedType pt && (pt.getRawType().equals(Map.class) || pt.getRawType().equals(MultivaluedMap.class))); }","tryCatchPattern":null,"preventionTips":["Use only Map or MultivaluedMap interfaces in client signatures","Avoid custom Map subclasses for request parameter passing","Wrap domain logic Maps into DTO classes instead"],"tags":["rest-client","build-time","generics","quarkus"],"backgroundTag":"unsupported-map-subtype-parameter","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}