apache/maven · error · IllegalArgumentException
Unrelated types: {} , {}
Error message
Unrelated types: {} , {} What it means
Error "Unrelated types: {} , {}" thrown in apache/maven.
Source
Thrown at impl/maven-di/src/main/java/org/apache/maven/di/impl/Types.java:91
} else {
throw new IllegalArgumentException("Unsupported type: " + type);
}
}
/**
* Returns the most common type among given types
*/
public static Type getUppermostType(Type[] types) {
Type result = types[0];
for (int i = 1; i < types.length; i++) {
Type type = types[i];
if (isAssignable(type, result)) {
result = type;
continue;
} else if (isAssignable(result, type)) {
continue;
}
throw new IllegalArgumentException("Unrelated types: " + result + " , " + type);
}
return result;
}
/**
* Returns an array of actual type arguments for a given {@link Type}
*
* @param type type whose actual type arguments should be retrieved
* @return an array of actual type arguments for a given {@link Type}
*/
public static Type[] getActualTypeArguments(Type type) {
if (type instanceof Class<?> clazz) {
return clazz.isArray() ? new Type[] {clazz.getComponentType()} : NO_TYPES;
} else if (type instanceof ParameterizedType parameterizedType) {
return parameterizedType.getActualTypeArguments();
} else if (type instanceof GenericArrayType genericArrayType) {
return new Type[] {genericArrayType.getGenericComponentType()};
}View on GitHub (pinned to e4093d4e12)
When it happens
Trigger: Thrown at impl/maven-di/src/main/java/org/apache/maven/di/impl/Types.java:91 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21).
Data as JSON: /api/errors/2df7de7e5df0a49c.
Report an issue: GitHub.