{"record":{"id":"a16782256b8b6c66","repo":"skylot/jadx","slug":"failed-to-parse-generic-types-map","errorCode":null,"errorMessage":"Failed to parse generic types map","messagePattern":"Failed to parse generic types map","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"error","filePath":"jadx-core/src/main/java/jadx/core/dex/nodes/parser/SignatureParser.java","lineNumber":289,"sourceCode":"\t/**\n\t * Map of generic types names to extends classes.\n\t * <p>\n\t * Example: \"&lt;T:Ljava/lang/Exception;:Ljava/lang/Object;&gt;\"\n\t */\n\t@SuppressWarnings(\"ConditionalBreakInInfiniteLoop\")\n\tpublic List<ArgType> consumeGenericTypeParameters() {\n\t\tif (!lookAhead('<')) {\n\t\t\treturn Collections.emptyList();\n\t\t}\n\t\tList<ArgType> list = new ArrayList<>();\n\t\tconsume('<');\n\t\twhile (true) {\n\t\t\tif (lookAhead('>') || next() == STOP_CHAR) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString id = consumeUntil(':');\n\t\t\tif (id == null) {\n\t\t\t\tthrow new JadxRuntimeException(\"Failed to parse generic types map\");\n\t\t\t}\n\t\t\tconsume(':');\n\t\t\ttryConsume(':');\n\t\t\tList<ArgType> types = consumeExtendsTypesList();\n\t\t\tlist.add(ArgType.genericType(id, types));\n\t\t}\n\t\tconsume('>');\n\t\treturn list;\n\t}\n\n\t/**\n\t * List of types separated by ':' last type is 'java.lang.Object'.\n\t * <p/>\n\t * Example: \"Ljava/lang/Exception;:Ljava/lang/Object;\"\n\t */\n\tprivate List<ArgType> consumeExtendsTypesList() {\n\t\tList<ArgType> types = Collections.emptyList();\n\t\tboolean next;","sourceCodeStart":271,"sourceCodeEnd":307,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/dex/nodes/parser/SignatureParser.java#L271-L307","documentation":"Thrown by consumeGenericTypeParameters() when parsing the '<...>' block that declares type parameters (e.g. '<T:Ljava/lang/Object;>'). After consuming '<' and the first identifier character, consumeUntil(':') returns null — meaning no ':' boundary was found before the end of the signature. Without a ':' the parser cannot separate the type-variable name from its bound, so it aborts.","triggerScenarios":"consumeGenericTypeParameters() enters the loop, consumeUntil(':') scans for ':' but hits STOP_CHAR first (signature ended or is malformed). The signature has a '<' with type-parameter content but no ':' separator, e.g. '<T' with no bound colon.","commonSituations":"Corrupt or truncated generic type-parameter declarations in Signature attributes, usually from obfuscators or faulty bytecode transformers. A class signature that opens a '<' but never properly delimits type parameters.","solutions":["Upgrade jadx for the latest parser improvements.","Catch JadxRuntimeException around per-class decompilation and continue.","Report the issue with the full signature from the error message.","Strip the class's Signature attribute before decompiling as a workaround."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    javaClass.decompile();\n} catch (JadxRuntimeException e) {\n    LOG.warn(\"Generic type-param parse failed in {}: {}\", javaClass.getName(), e.getMessage());\n}","preventionTips":["Use the latest jadx release.","Catch JadxRuntimeException per class to avoid batch failure.","Report corrupted type-parameter signatures with the debug string.","Strip the class's Signature attribute if generics info is expendable."],"tags":["jadx","decompiler","signature-parser","generics","type-parameters","obfuscation"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}