quarkusio/quarkus · error · IllegalArgumentException
Our supertype instance ${appliedType} does not match superty
Error message
Our supertype instance ${appliedType} does not match supertype declared arguments: ${superType.typeParameters()} What it means
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.
Source
Thrown at independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/JandexUtil.java:237
// we passed them explicitely
if (appliedType.kind() == Kind.PARAMETERIZED_TYPE) {
appliedArguments = appliedType.asParameterizedType().arguments();
} else {
// raw supertype: use bounds
appliedArguments = new ArrayList<>(superType.typeParameters().size());
for (TypeVariable typeVariable : superType.typeParameters()) {
if (!typeVariable.bounds().isEmpty()) {
appliedArguments.add(typeVariable.bounds().get(0));
} else {
appliedArguments.add(ClassType.create(DOTNAME_OBJECT, Kind.CLASS));
}
}
}
// it's a problem if we got different arguments to the parameters declared
if (appliedArguments.size() != superType.typeParameters().size()) {
throw new IllegalArgumentException("Our supertype instance " + appliedType
+ " does not match supertype declared arguments: " + superType.typeParameters());
}
// build the mapping
Map<String, Type> mapping = new HashMap<>();
for (int i = 0; i < superType.typeParameters().size(); i++) {
TypeVariable typeParameter = superType.typeParameters().get(i);
mapping.put(typeParameter.identifier(), appliedArguments.get(i));
}
// and map
return mapGenerics(typeArgumentsFromSupertype, mapping);
}
private static boolean containsTypeParameters(List<Type> typeArgumentsFromSupertype) {
for (Type type : typeArgumentsFromSupertype) {
if (containsTypeParameters(type)) {
return true;
}
}View on GitHub (pinned to e1c734241f)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: 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.
Common situations: See trigger scenarios.
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/a5c16067567d54a5.
Report an issue: GitHub.