{"record":{"id":"3aa0421bd6275157","repo":"oracle/graal","slug":"must-not-call-isautomatic-on-an-unnamed-module","errorCode":null,"errorMessage":"Must not call isAutomatic() on an unnamed module","messagePattern":"Must not call isAutomatic\\(\\) on an unnamed module","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler.hostvmaccess/src/jdk/graal/compiler/hostvmaccess/HostVMResolvedJavaModuleImpl.java","lineNumber":103,"sourceCode":"    @Override\n    public boolean isExported(String packageName, ResolvedJavaModule accessingModule) {\n        return module.isExported(packageName, toImpl(accessingModule).module);\n    }\n\n    @Override\n    public Set<String> getPackages() {\n        return module.getPackages();\n    }\n\n    @Override\n    public boolean isNamed() {\n        return module.isNamed();\n    }\n\n    @Override\n    public boolean isAutomatic() {\n        if (!isNamed()) {\n            throw new IllegalArgumentException(\"Must not call isAutomatic() on an unnamed module\");\n        }\n        return module.getDescriptor().isAutomatic();\n    }\n\n    private static HostVMResolvedJavaModuleImpl toImpl(ResolvedJavaModule module) {\n        if (module instanceof HostVMResolvedJavaModuleImpl moduleImpl) {\n            return moduleImpl;\n        }\n        throw new IllegalArgumentException(\"Unsupported ResolvedJavaModule implementation: \" + module.getClass().getName());\n    }\n\n    /**\n     * Updates a {@code accessingModule} to read {@code this} module during the image build. This\n     * method is not meant to change any runtime property of {@code this} module. This method is\n     * accessed reflectively.\n     */\n    void addReads(Module accessingModule) {\n        ModuleSupport.addOpens(accessingModule, toImpl(this).module);","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler.hostvmaccess/src/jdk/graal/compiler/hostvmaccess/HostVMResolvedJavaModuleImpl.java#L85-L121","documentation":"Error \"Must not call isAutomatic() on an unnamed module\" thrown in oracle/graal.","triggerScenarios":"Thrown at compiler/src/jdk.graal.compiler.hostvmaccess/src/jdk/graal/compiler/hostvmaccess/HostVMResolvedJavaModuleImpl.java:103 when the library encounters an invalid state.","commonSituations":"Occurs when a caller violates the contract guarded by this check: Must not call isAutomatic() on an unnamed module","solutions":["Fix the condition reported by the error: Must not call isAutomatic() on an unnamed module","Check the throwing call site and ensure its documented preconditions (argument values, types, environment, or configuration) are satisfied before the call."],"exampleFix":"Validate inputs and environment so that the failing condition does not occur: Must not call isAutomatic() on an unnamed module","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}