{"record":{"id":"f2208268517a331d","repo":"skylot/jadx","slug":"plugin-option-values-is-null-option-plugin","errorCode":null,"errorMessage":"Plugin option values is null, option: {}, plugin: {}","messagePattern":"Plugin option values is null, option: (.+?), plugin: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"jadx-core/src/main/java/jadx/core/plugins/JadxPluginManager.java","lineNumber":205,"sourceCode":"\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\n\tpublic List<JadxCodeInput> getCodeInputs() {\n\t\treturn getResolvedPluginContexts()\n\t\t\t\t.stream()\n\t\t\t\t.flatMap(p -> p.getCodeInputs().stream())\n\t\t\t\t.collect(Collectors.toList());\n\t}\n\n\tpublic void registerAddPluginListener(Consumer<PluginContext> listener) {\n\t\tthis.addPluginListeners.add(listener);\n\t\t// run for already added plugins\n\t\tgetAllPluginContexts().forEach(listener);\n\t}\n}\n","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/plugins/JadxPluginManager.java#L187-L223","documentation":"Thrown as IllegalArgumentException by JadxPluginManager.verifyOptions() when an OptionDescription.values() returns null. The values() method returns the list of accepted values for an option (used for validation and GUI dropdowns). A null return is a contract violation — even options with unrestricted values should return an empty list, not null.","triggerScenarios":"A plugin's OptionDescription.values() returns null. The manager checks this for every option description after plugin initialization. Options that accept any value should return Collections.emptyList() rather than null.","commonSituations":"Custom jadx plugin development where the author returns null from values() for free-form string options, not realizing the manager requires a non-null list.","solutions":["Return Collections.emptyList() (or a list of accepted values) from values() instead of null.","If you are not the plugin author, report the bug or disable the plugin via the disabled-plugins list."],"exampleFix":"// before\nnew OptionDescription() {\n    public List<String> values() { return null; }\n    ...\n}\n\n// after\nnew OptionDescription() {\n    public List<String> values() { return Collections.emptyList(); }\n    ...\n}","handlingStrategy":"validation","validationCode":"// In your OptionDescription implementation\n@Override\npublic List<String> values() {\n    // Return empty list for unrestricted options, never null\n    return acceptedValues != null ? acceptedValues : Collections.emptyList();\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Plugin authors: return Collections.emptyList() instead of null from values().","Add a unit test asserting values() returns non-null for all options.","Plugin users: disable broken plugins via the disabled-plugins list."],"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"}