{"record":{"id":"2df7de7e5df0a49c","repo":"apache/maven","slug":"unrelated-types","errorCode":null,"errorMessage":"Unrelated types: {} , {}","messagePattern":"Unrelated types: (.+?) , (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"impl/maven-di/src/main/java/org/apache/maven/di/impl/Types.java","lineNumber":91,"sourceCode":"        } else {\n            throw new IllegalArgumentException(\"Unsupported type: \" + type);\n        }\n    }\n\n    /**\n     * Returns the most common type among given types\n     */\n    public static Type getUppermostType(Type[] types) {\n        Type result = types[0];\n        for (int i = 1; i < types.length; i++) {\n            Type type = types[i];\n            if (isAssignable(type, result)) {\n                result = type;\n                continue;\n            } else if (isAssignable(result, type)) {\n                continue;\n            }\n            throw new IllegalArgumentException(\"Unrelated types: \" + result + \" , \" + type);\n        }\n        return result;\n    }\n\n    /**\n     * Returns an array of actual type arguments for a given {@link Type}\n     *\n     * @param type type whose actual type arguments should be retrieved\n     * @return an array of actual type arguments for a given {@link Type}\n     */\n    public static Type[] getActualTypeArguments(Type type) {\n        if (type instanceof Class<?> clazz) {\n            return clazz.isArray() ? new Type[] {clazz.getComponentType()} : NO_TYPES;\n        } else if (type instanceof ParameterizedType parameterizedType) {\n            return parameterizedType.getActualTypeArguments();\n        } else if (type instanceof GenericArrayType genericArrayType) {\n            return new Type[] {genericArrayType.getGenericComponentType()};\n        }","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-di/src/main/java/org/apache/maven/di/impl/Types.java#L73-L109","documentation":"Error \"Unrelated types: {} , {}\" thrown in apache/maven.","triggerScenarios":"Thrown at impl/maven-di/src/main/java/org/apache/maven/di/impl/Types.java:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}