{"record":{"id":"f85ba2ee98cbdf2b","repo":"skylot/jadx","slug":"a-sealed-class-abstractblockpathtraverserhandler","errorCode":null,"errorMessage":"A sealed class, AbstractBlockPathTraverserHandler, has an unknown implementation","messagePattern":"A sealed class, AbstractBlockPathTraverserHandler, has an unknown implementation","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"critical","filePath":"jadx-core/src/main/java/jadx/core/dex/visitors/finaly/traverser/TraverserController.java","lineNumber":45,"sourceCode":" *\n * The terms \"finally\" and \"candidate\" are used to represent the two distinct subgraphs explored\n * by this controller; the \"finally\" subgraph, which is the subgraph which is what is being used\n * as a finally block, and the \"candidate\" subgraph, which is the subgraph which is being\n * compared to the \"finally\" subgraph to see if they are the same. There is only ever one\n * \"finally\" subgraph, however it is run against multiple different \"candidate\" subgraphs depending\n * on the complexity of the try catch block that this is being run for.\n */\npublic final class TraverserController {\n\n\tprivate static List<TraverserActivePathState> processHandlerImplementations(TraverserActivePathState state,\n\t\t\tAbstractBlockTraverserHandler handler) throws TraverserException {\n\t\tif (handler instanceof AbstractBlockPathTraverserHandler) {\n\t\t\t((AbstractBlockPathTraverserHandler) handler).process();\n\t\t\treturn List.of(state);\n\t\t} else if (handler instanceof AbstractActivePathTraverserHandler) {\n\t\t\treturn ((AbstractActivePathTraverserHandler) handler).process();\n\t\t} else {\n\t\t\tthrow new JadxRuntimeException(\n\t\t\t\t\t\"A sealed class, \" + AbstractBlockPathTraverserHandler.class.getSimpleName() + \", has an unknown implementation\");\n\t\t}\n\t}\n\n\tprivate final @Nullable Function<TraverserState, Boolean> stateAbortCondition;\n\n\tpublic TraverserController() {\n\t\tthis(null);\n\t}\n\n\tpublic TraverserController(@Nullable Function<TraverserState, Boolean> stateAbortCondition) {\n\t\tthis.stateAbortCondition = stateAbortCondition;\n\t}\n\n\t/**\n\t * Processes a traverser path state using from a {@link TraverserActivePathState}. This\n\t * function will continue evaluating an active path until either:\n\t * <ul>","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/dex/visitors/finaly/traverser/TraverserController.java#L27-L63","documentation":"Thrown in the TraverserController's handler dispatch. The traverser framework uses a sealed class hierarchy with two known AbstractBlockTraverserHandler subclasses: AbstractBlockPathTraverserHandler and AbstractActivePathTraverserHandler. If a handler instance is neither, a new subclass was added without updating the dispatch logic.","triggerScenarios":"An AbstractBlockTraverserHandler subclass that is not one of the two known implementations is passed to processHandlerImplementations. The instanceof chain falls through to the else branch.","commonSituations":"This is a jadx internal development error, not input-driven. A developer added a new traverser handler subclass without updating the dispatch in TraverserController. Should never occur from any APK input.","solutions":["Update jadx — this will be fixed in the next release if it was a development regression","Report as a jadx issue immediately — this is a sealed-class contract violation","This cannot be triggered or fixed by user input; it requires a jadx source fix"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    jadxDecompiler.load();\n    jadxDecompiler.save();\n} catch (JadxRuntimeException e) {\n    if (e.getMessage().contains(\"sealed class\") && e.getMessage().contains(\"unknown implementation\")) {\n        LOG.error(\"Internal jadx traverser bug — update jadx and report this issue\", e);\n        // This is a development bug, switch to fallback or alternative decompiler\n    } else {\n        throw e;\n    }\n}","preventionTips":["Update jadx to the latest version — this is a sealed-class dispatch regression","Report immediately as a jadx GitHub issue — this should never occur from any input","Use an alternative decompiler (CFR, Procyon, Fernflower) as a fallback for the affected class","This error cannot be prevented by user input configuration"],"tags":["traverser","internal-bug","sealed-class","finally-block","decompiler"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}