{"record":{"id":"c981570c04866787","repo":"quarkusio/quarkus","slug":"unknown-primitive-type-c98157","errorCode":null,"errorMessage":"Unknown primitive type: ","messagePattern":"Unknown primitive type: ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/AsmUtil.java","lineNumber":61,"sourceCode":"                    unbox(mv, \"java/lang/Character\", \"charValue\", \"C\");\n                    break;\n                case DOUBLE:\n                    unbox(mv, \"java/lang/Double\", \"doubleValue\", \"D\");\n                    break;\n                case FLOAT:\n                    unbox(mv, \"java/lang/Float\", \"floatValue\", \"F\");\n                    break;\n                case INT:\n                    unbox(mv, \"java/lang/Integer\", \"intValue\", \"I\");\n                    break;\n                case LONG:\n                    unbox(mv, \"java/lang/Long\", \"longValue\", \"J\");\n                    break;\n                case SHORT:\n                    unbox(mv, \"java/lang/Short\", \"shortValue\", \"S\");\n                    break;\n                default:\n                    throw new IllegalArgumentException(\"Unknown primitive type: \" + jandexType);\n            }\n        }\n    }\n\n    /**\n     * Calls the right unboxing method for the given Jandex Type if it is a primitive.\n     *\n     * @param mv The MethodVisitor on which to visit the unboxing instructions\n     * @param type The Jandex Type to unbox if it is a primitive.\n     */\n    public static void unboxIfRequired(MethodVisitor mv, org.objectweb.asm.Type type) {\n        if (type.getSort() <= org.objectweb.asm.Type.DOUBLE) {\n            switch (type.getSort()) {\n                case org.objectweb.asm.Type.BOOLEAN:\n                    unbox(mv, \"java/lang/Boolean\", \"booleanValue\", \"Z\");\n                    break;\n                case org.objectweb.asm.Type.BYTE:\n                    unbox(mv, \"java/lang/Byte\", \"byteValue\", \"B\");","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/AsmUtil.java#L43-L79","documentation":"AsmUtil.unboxIfRequired generates bytecode that unboxes a Jandex-typed value when the target is a primitive. Its private unbox switch covers Integer/Long/Short and a default branch that throws IllegalArgumentException 'Unknown primitive type: <jandexType>' when the primitive kind is not among the handled ones in this code path. It is a code-generation-time error, meaning the processor encountered a primitive Type.Kind it cannot emit unboxing instructions for.","triggerScenarios":"Build-time bytecode generation where unboxIfRequired is called with a Jandex Type whose kind is primitive but falls into the default switch branch (e.g. BYTE, CHAR, DOUBLE, FLOAT, BOOLEAN reaching this particular switch, which only explicitly boxes LONG and SHORT among others in the shown region).","commonSituations":"REST resource or client proxy method signatures with unusual primitive parameter types during Quarkus/RESTEasy Reactive augmentation; upgrading RESTEasy Reactive and hitting an unhandled kind in generated proxies.","solutions":["Change the endpoint/proxy method signature to use a wrapper type (java.lang.Byte, Character, Double, etc.) instead of the offending primitive","Check the RESTEasy Reactive version; upgrade to a release where AsmUtil handles all primitive kinds","Report the failing type (from the message) as a bug with a reproducer if the primitive should be supported"],"exampleFix":"// before\npublic double compute(double input) { ... }\n// after (if generator cannot handle it)\npublic Double compute(Double input) { ... }","handlingStrategy":"validation","validationCode":"// check endpoint signatures at build/dev time\n// avoid exotic primitives in resource method parameters/returns\nboolean usesUnsupportedPrimitive(Method m) {\n    return Stream.concat(Stream.of(m.getReturnType()), Arrays.stream(m.getParameterTypes()))\n        .anyMatch(t -> t.isPrimitive() && (t == byte.class || t == char.class));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer wrapper types in JAX-RS method signatures","Run the Quarkus build (augmentation) early in CI to surface codegen errors","Upgrade Quarkus when adding unusual primitive signatures","Read the type in the error message and adjust that signature"],"tags":["build-time","bytecode","asm","code-generation","resteasy-reactive"],"backgroundTag":"unknown-primitive-type","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}