{"record":{"id":"4e07b3281e035c16","repo":"skylot/jadx","slug":"field-handle-not-yet-supported","errorCode":null,"errorMessage":"Field handle not yet supported","messagePattern":"Field handle not yet supported","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"warning","filePath":"jadx-core/src/main/java/jadx/core/dex/instructions/invokedynamic/CustomRawCall.java","lineNumber":38,"sourceCode":"import jadx.core.dex.nodes.RootNode;\nimport jadx.core.utils.exceptions.JadxRuntimeException;\n\nimport static jadx.core.utils.EncodedValueUtils.buildLookupArg;\nimport static jadx.core.utils.EncodedValueUtils.convertToInsnArg;\n\n/**\n * Show `invoke-custom` similar to polymorphic call\n */\npublic class CustomRawCall {\n\n\tpublic static InsnNode build(MethodNode mth, InsnData insn, boolean isRange, List<EncodedValue> values) {\n\t\tIMethodHandle resolveHandle = (IMethodHandle) values.get(0).getValue();\n\t\tString invokeName = (String) values.get(1).getValue();\n\t\tIMethodProto invokeProto = (IMethodProto) values.get(2).getValue();\n\t\tList<InsnArg> resolveArgs = buildArgs(mth, values);\n\n\t\tif (resolveHandle.getType().isField()) {\n\t\t\tthrow new JadxRuntimeException(\"Field handle not yet supported\");\n\t\t}\n\n\t\tRootNode root = mth.root();\n\t\tMethodInfo resolveMth = MethodInfo.fromRef(root, resolveHandle.getMethodRef());\n\t\tInvokeType resolveInvokeType = InvokeCustomUtils.convertInvokeType(resolveHandle.getType());\n\t\tInvokeNode resolve = new InvokeNode(resolveMth, resolveInvokeType, resolveArgs.size());\n\t\tresolveArgs.forEach(resolve::addArg);\n\n\t\tClassInfo invokeCls = ClassInfo.fromType(root, ArgType.OBJECT); // type will be known at runtime\n\t\tMethodInfo invokeMth = MethodInfo.fromMethodProto(root, invokeCls, invokeName, invokeProto);\n\t\tInvokeCustomRawNode customRawNode = new InvokeCustomRawNode(resolve, invokeMth, insn, isRange);\n\t\tcustomRawNode.setCallSiteValues(values);\n\t\treturn customRawNode;\n\t}\n\n\tprivate static List<InsnArg> buildArgs(MethodNode mth, List<EncodedValue> values) {\n\t\tint valuesCount = values.size();\n\t\tList<InsnArg> list = new ArrayList<>(valuesCount);","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/dex/instructions/invokedynamic/CustomRawCall.java#L20-L56","documentation":"In CustomRawCall.build(), the resolve bootstrap method handle (values[0]) is a field handle. CustomRawCall models invoke-custom as a polymorphic-style call and only supports method handles, so a field handle is explicitly unsupported.","triggerScenarios":"An invoke-custom instruction whose bootstrap method handle is a field handle (STATIC_GET/PUT, INSTANCE_GET/PUT) rather than an invoke handle.","commonSituations":"Rare/novel bytecode patterns, custom bootstrap methods, or obfuscation. This is a known feature gap in the raw invoke-custom fallback path.","solutions":["Upgrade JADX.","Check the issue tracker for field-handle invoke-custom support.","Use --show-bad-code; the site degrades to a NOP with a JadxError.","Report the bootstrap method handle type upstream."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":"// Detect a field-handle resolve bootstrap before calling CustomRawCall.build.\nIMethodHandle resolveHandle = (IMethodHandle) values.get(0).getValue();\nboolean unsupported = resolveHandle.getType().isField();","tryCatchPattern":"try {\n    jadx.load();\n} catch (JadxRuntimeException e) {\n    if (e.getMessage().contains(\"Field handle not yet supported\")) {\n        log.warn(\"Field-handle invoke-custom not yet supported\", e);\n    } else throw e;\n}","preventionTips":["Use --show-bad-code so field-handle invoke-custom sites degrade gracefully.","Track JADX releases for field-handle support.","Decompile per-class to isolate the affected class."],"tags":["invoke-custom","method-handle","feature-gap"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}