{"record":{"id":"0f105f45291d7e09","repo":"skylot/jadx","slug":"null-option-descriptions-in-plugin-id","errorCode":null,"errorMessage":"Null option descriptions in plugin id: {}","messagePattern":"Null option descriptions in plugin id: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"jadx-core/src/main/java/jadx/core/plugins/JadxPluginManager.java","lineNumber":191,"sourceCode":"\t\t\t\tcontext.unload();\n\t\t\t} catch (Exception e) {\n\t\t\t\tLOG.warn(\"Failed to unload plugin: {}\", context.getPluginId(), e);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate AppContext buildDefaultAppContext() {\n\t\tAppContext appContext = new AppContext();\n\t\tappContext.setGuiContext(null);\n\t\tappContext.setFilesGetter(decompiler.getArgs().getFilesGetter());\n\t\treturn appContext;\n\t}\n\n\tprivate void verifyOptions(PluginContext pluginContext, JadxPluginOptions options) {\n\t\tString pluginId = pluginContext.getPluginId();\n\t\tList<OptionDescription> descriptions = options.getOptionsDescriptions();\n\t\tif (descriptions == null) {\n\t\t\tthrow new IllegalArgumentException(\"Null option descriptions in plugin id: \" + pluginId);\n\t\t}\n\t\tString prefix = pluginId + '.';\n\t\tdescriptions.forEach(descObj -> {\n\t\t\tString optName = descObj.name();\n\t\t\tif (optName == null || !optName.startsWith(prefix)) {\n\t\t\t\tthrow new IllegalArgumentException(\"Plugin option name should start with plugin id: '\" + prefix + \"', option: \" + optName);\n\t\t\t}\n\t\t\tString desc = descObj.description();\n\t\t\tif (desc == null || desc.isEmpty()) {\n\t\t\t\tthrow new IllegalArgumentException(\"Plugin option description not set, plugin: \" + pluginId);\n\t\t\t}\n\t\t\tList<String> values = descObj.values();\n\t\t\tif (values == null) {\n\t\t\t\tthrow new IllegalArgumentException(\"Plugin option values is null, option: \" + optName + \", plugin: \" + pluginId);\n\t\t\t}\n\t\t});\n\t}\n","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/plugins/JadxPluginManager.java#L173-L209","documentation":"Thrown as IllegalArgumentException by JadxPluginManager.verifyOptions() when a plugin's JadxPluginOptions.getOptionsDescriptions() returns null. Every plugin that declares options must return a non-null (possibly empty) list of OptionDescription. A null return is treated as a plugin contract violation because the manager needs to iterate descriptions to validate option naming, descriptions, and values.","triggerScenarios":"A plugin's init() calls context.init() with a JadxPluginOptions whose getOptionsDescriptions() returns null. This occurs during plugin initialization (after initAll/initResolved), when the manager validates all option metadata.","commonSituations":"Third-party or custom jadx plugin that implements JadxPluginOptions but returns null from getOptionsDescriptions() instead of an empty list. Often a developer oversight when the plugin has no options to declare.","solutions":["If you are the plugin author: return Collections.emptyList() instead of null from getOptionsDescriptions().","If you are the plugin user: report the bug to the plugin author, or disable the plugin via the disabled-plugins list.","Update the plugin to a version that returns an empty list for no-option plugins."],"exampleFix":"// before\n@Override\npublic List<OptionDescription> getOptionsDescriptions() {\n    return null; // triggers error\n}\n\n// after\n@Override\npublic List<OptionDescription> getOptionsDescriptions() {\n    return Collections.emptyList();\n}","handlingStrategy":"validation","validationCode":"// In your JadxPluginOptions implementation\n@Override\npublic List<OptionDescription> getOptionsDescriptions() {\n    // Return empty list instead of null when there are no options\n    return Collections.emptyList();\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Plugin authors: always return a non-null list from getOptionsDescriptions(), even if empty.","Add a unit test that calls getOptionsDescriptions() and asserts non-null.","Plugin users: disable broken plugins via the disabled-plugins configuration."],"tags":["jadx","plugins","options","null-check","plugin-contract","illegal-argument"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}