{"record":{"id":"633f0f9caa653f16","repo":"quarkusio/quarkus","slug":"unrecognized-primitive-c","errorCode":null,"errorMessage":"Unrecognized primitive \" + c","messagePattern":"Unrecognized primitive \" \\+ c","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/funqy/funqy-server-common/runtime/src/main/java/io/quarkus/funqy/runtime/FunctionRegistry.java","lineNumber":66,"sourceCode":"            if (c == byte.class)\n                return \"B\";\n            if (c == char.class)\n                return \"C\";\n            if (c == double.class)\n                return \"D\";\n            if (c == float.class)\n                return \"F\";\n            if (c == int.class)\n                return \"I\";\n            if (c == long.class)\n                return \"J\";\n            if (c == short.class)\n                return \"S\";\n            if (c == boolean.class)\n                return \"Z\";\n            if (c == void.class)\n                return \"V\";\n            throw new RuntimeException(\"Unrecognized primitive \" + c);\n        }\n        if (c.isArray())\n            return c.getName().replace('.', '/');\n        return ('L' + c.getName() + ';').replace('.', '/');\n    }\n\n    private static String getMethodDescriptor(Method m) {\n        String s = \"(\";\n        for (final Class c : m.getParameterTypes())\n            s += getDescriptorForClass(c);\n        s += ')';\n        return s + getDescriptorForClass(m.getReturnType());\n    }\n}\n","sourceCodeStart":48,"sourceCodeEnd":81,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/funqy/funqy-server-common/runtime/src/main/java/io/quarkus/funqy/runtime/FunctionRegistry.java#L48-L81","documentation":"getMethodDescriptor() builds a JVM-style descriptor string and getDescriptorForClass() maps primitives to their JVM letters. Reaching the final throw means an unrecognized Class object was passed as a primitive — an internal invariant violation rather than user error.","triggerScenarios":"Only reachable if a Class representing neither a known primitive, an array, nor a normal class reaches descriptor computation — typically with exotic classloader artifacts or a corrupted class reference.","commonSituations":"Very rare; may surface with broken instrumentation agents, mismatched JDK versions, or custom classloader tricks during Funqy registry building.","solutions":["Clean rebuild and restart with a standard JDK to rule out stale/corrupted classes","Disable custom agents/instrumentation and retry","Report to Quarkus Funqy maintainers with the class name in the message if reproducible"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Validate the class is a supported kind before descriptor computation\nif (!(c.isPrimitive() || c.isArray() || !c.isInterface() || c.isInterface()))\n    throw new IllegalArgumentException(\"Unsupported class for descriptor: \" + c);","typeGuard":null,"tryCatchPattern":"try {\n    String desc = FunctionRegistry.getMethodDescriptor(m);\n} catch (RuntimeException e) {\n    if (e.getMessage().startsWith(\"Unrecognized primitive\")) {\n        log.errorf(e, \"Descriptor computation hit an unexpected class; check JDK/agent setup\");\n    }\n    throw e;\n}","preventionTips":["Use standard JDK builds without exotic agents when building Funqy apps","Keep quarkus-funqy dependencies at matching versions","Reproduce with a clean environment before filing a bug"],"tags":["quarkus","funqy","reflection","internals"],"backgroundTag":"unrecognized-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"}