{"record":{"id":"a5c16067567d54a5","repo":"quarkusio/quarkus","slug":"our-supertype-instance-appliedtype-does-not-mat","errorCode":null,"errorMessage":"Our supertype instance ${appliedType} does not match supertype declared arguments: ${superType.typeParameters()}","messagePattern":"Our supertype instance (.+?) does not match supertype declared arguments: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/JandexUtil.java","lineNumber":237,"sourceCode":"\n        // we passed them explicitely\n        if (appliedType.kind() == Kind.PARAMETERIZED_TYPE) {\n            appliedArguments = appliedType.asParameterizedType().arguments();\n        } else {\n            // raw supertype: use bounds\n            appliedArguments = new ArrayList<>(superType.typeParameters().size());\n            for (TypeVariable typeVariable : superType.typeParameters()) {\n                if (!typeVariable.bounds().isEmpty()) {\n                    appliedArguments.add(typeVariable.bounds().get(0));\n                } else {\n                    appliedArguments.add(ClassType.create(DOTNAME_OBJECT, Kind.CLASS));\n                }\n            }\n        }\n\n        // it's a problem if we got different arguments to the parameters declared\n        if (appliedArguments.size() != superType.typeParameters().size()) {\n            throw new IllegalArgumentException(\"Our supertype instance \" + appliedType\n                    + \" does not match supertype declared arguments: \" + superType.typeParameters());\n        }\n        // build the mapping\n        Map<String, Type> mapping = new HashMap<>();\n        for (int i = 0; i < superType.typeParameters().size(); i++) {\n            TypeVariable typeParameter = superType.typeParameters().get(i);\n            mapping.put(typeParameter.identifier(), appliedArguments.get(i));\n        }\n        // and map\n        return mapGenerics(typeArgumentsFromSupertype, mapping);\n    }\n\n    private static boolean containsTypeParameters(List<Type> typeArgumentsFromSupertype) {\n        for (Type type : typeArgumentsFromSupertype) {\n            if (containsTypeParameters(type)) {\n                return true;\n            }\n        }","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/JandexUtil.java#L219-L255","documentation":"Build-time guard in JandexUtil.mapTypeArguments: while mapping generic type arguments of a supertype onto a subclass, the number of applied type arguments does not match the number of declared type parameters of the supertype. This indicates an inconsistent generics hierarchy (e.g. a raw/partially parameterized supertype) and processing is aborted.","triggerScenarios":"Thrown at independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/JandexUtil.java:237 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the generics of the endpoint hierarchy so subclasses pass all type arguments of the supertype","Avoid raw uses of generic supertypes in resource class hierarchies"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}