{"record":{"id":"0b81261c07394bd5","repo":"apache/maven","slug":"type-variable-not-found","errorCode":null,"errorMessage":"Type variable not found: {} ( {} )","messagePattern":"Type variable not found: (.+?) \\( (.+?) \\)","errorType":"exception","errorClass":"TypeNotBoundException","httpStatus":null,"severity":"error","filePath":"impl/maven-di/src/main/java/org/apache/maven/di/impl/Types.java","lineNumber":192,"sourceCode":"     */\n    public static Type bind(Type type, Map<TypeVariable<?>, Type> bindings) {\n        return bind(type, bindings::get);\n    }\n\n    /**\n     * Binds a given type with actual type arguments\n     *\n     * @param type     a type to be bound\n     * @param bindings a lookup function for actual types\n     */\n    public static Type bind(Type type, Function<TypeVariable<?>, Type> bindings) {\n        if (type instanceof Class) {\n            return type;\n        }\n        if (type instanceof TypeVariable<?> typeVariable) {\n            Type actualType = bindings.apply(typeVariable);\n            if (actualType == null) {\n                throw new TypeNotBoundException(\"Type variable not found: \" + typeVariable + \" ( \"\n                        + typeVariable.getGenericDeclaration() + \" ) \");\n            }\n            return actualType;\n        }\n        if (type instanceof ParameterizedType parameterizedType) {\n            Type[] typeArguments = parameterizedType.getActualTypeArguments();\n            Type[] typeArguments2 = new Type[typeArguments.length];\n            for (int i = 0; i < typeArguments.length; i++) {\n                typeArguments2[i] = bind(typeArguments[i], bindings);\n            }\n            return new ParameterizedTypeImpl(\n                    parameterizedType.getOwnerType(), parameterizedType.getRawType(), typeArguments2);\n        }\n        if (type instanceof GenericArrayType genericArrayType) {\n            Type componentType = genericArrayType.getGenericComponentType();\n            return new GenericArrayTypeImpl(bind(componentType, bindings));\n        }\n        if (type instanceof WildcardType wildcardType) {","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-di/src/main/java/org/apache/maven/di/impl/Types.java#L174-L210","documentation":"Error \"Type variable not found: {} ( {} )\" thrown in apache/maven.","triggerScenarios":"Thrown at impl/maven-di/src/main/java/org/apache/maven/di/impl/Types.java:192 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-22T04:17:13.399Z"}