{"record":{"id":"41316990d2b80b22","repo":"quarkusio/quarkus","slug":"unsupported-primitive","errorCode":null,"errorMessage":"Unsupported primitive: ","messagePattern":"Unsupported primitive: ","errorType":"exception","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/Types.java","lineNumber":214,"sourceCode":"        switch (primitive) {\n            case BOOLEAN:\n                return Type.create(DotNames.BOOLEAN, Kind.CLASS);\n            case DOUBLE:\n                return Type.create(DotNames.DOUBLE, Kind.CLASS);\n            case FLOAT:\n                return Type.create(DotNames.FLOAT, Kind.CLASS);\n            case LONG:\n                return Type.create(DotNames.LONG, Kind.CLASS);\n            case INT:\n                return Type.create(DotNames.INTEGER, Kind.CLASS);\n            case BYTE:\n                return Type.create(DotNames.BYTE, Kind.CLASS);\n            case CHAR:\n                return Type.create(DotNames.CHARACTER, Kind.CLASS);\n            case SHORT:\n                return Type.create(DotNames.SHORT, Kind.CLASS);\n            default:\n                throw new IllegalArgumentException(\"Unsupported primitive: \" + primitive);\n        }\n    }\n\n    static boolean isImplementorOf(ClassInfo target, DotName interfaceName, IndexView index) {\n        if (target.interfaceNames().contains(interfaceName)) {\n            // Direct implementor\n            return true;\n        }\n        DotName superName = target.superName();\n        if (superName != null && !superName.equals(DotName.OBJECT_NAME)) {\n            ClassInfo superClass = index.getClassByName(superName);\n            if (superClass != null && isImplementorOf(superClass, interfaceName, index)) {\n                // Superclass is implementor\n                return true;\n            }\n        }\n        for (DotName name : target.interfaceNames()) {\n            ClassInfo interfaceClass = index.getClassByName(name);","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/Types.java#L196-L232","documentation":"Types.box() converts a primitive Type (byte, short, char, int, long, float, double, boolean) to its boxed wrapper class. The default branch throws IllegalArgumentException('Unsupported primitive: ...') for any Type.Kind.PRIMITIVE whose kind is not among the handled cases (e.g. VOID or unexpected primitive kinds).","triggerScenarios":"Qute type-resolution code passes a primitive type to Types.box() that has no boxed mapping — typically a void method's return type or a wrongly-parsed type descriptor reaching the boxing logic.","commonSituations":"Template expression referencing a void-returning method where the result type is then boxed; a bug/edge case in type parsing producing an unexpected primitive kind; extension code calling Types.box directly on a void type.","solutions":["Ensure the boxed type isn't void: don't box the result of void-returning method calls","If writing extension code, guard with type.kind() == Kind.PRIMITIVE && type.asPrimitiveType().primitive() != PrimitiveType.VOID before boxing","File a bug with the template expression if a normal primitive (int, char, ...) triggers this"],"exampleFix":"// before\nDotName boxed = Types.box(method.returnType()).name();\n// after\nif (method.returnType().kind() != Type.Kind.VOID) { DotName boxed = Types.box(method.returnType()).name(); }","handlingStrategy":"type-guard","validationCode":"boolean boxable = type.kind() == Type.Kind.PRIMITIVE\n    && type.asPrimitiveType().primitive() != org.jboss.jandex.PrimitiveType.VOID;","typeGuard":"if (type.kind() == Type.Kind.PRIMITIVE && type.asPrimitiveType().primitive() != PrimitiveType.VOID) {\n    Type boxed = Types.box(type);\n}","tryCatchPattern":null,"preventionTips":["Never box void-returning method results in template type analysis","Guard box() calls with a kind check","Cover primitive and void cases in tests of any custom type-walking extension code"],"tags":["qute","jandex","types","build-time"],"backgroundTag":"unsupported-primitive-type","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"}