{"record":{"id":"2c2adbaef149ef7e","repo":"apache/maven","slug":"supplier-is-closed","errorCode":null,"errorMessage":"Supplier is closed","messagePattern":"Supplier is closed","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"impl/maven-testing/src/main/java/org/apache/maven/testing/plugin/stubs/RepositorySystemSupplier.java","lineNumber":207,"sourceCode":" * Extend this class {@code createXXX()} methods and override to customize, if needed. The contract of this class makes\n * sure that these (potentially overridden) methods are invoked only once, and instance created by those methods are\n * memorized and kept as long as supplier instance is kept open.\n * <p>\n * This class is not thread safe and must be used from one thread only, while the constructed {@link RepositorySystem}\n * is thread safe.\n * <p>\n * Important: Given the instance of supplier memorizes the supplier {@link RepositorySystem} instance it supplies,\n * their lifecycle is shared as well: once supplied repository system is shut-down, this instance becomes closed as\n * well. Any subsequent {@code getXXX} method invocation attempt will fail with {@link IllegalStateException}.\n */\npublic class RepositorySystemSupplier implements Supplier<RepositorySystem> {\n    private final AtomicBoolean closed = new AtomicBoolean(false);\n\n    public RepositorySystemSupplier() {}\n\n    private void checkClosed() {\n        if (closed.get()) {\n            throw new IllegalStateException(\"Supplier is closed\");\n        }\n    }\n\n    private PathProcessor pathProcessor;\n\n    public final PathProcessor getPathProcessor() {\n        checkClosed();\n        if (pathProcessor == null) {\n            pathProcessor = createPathProcessor();\n        }\n        return pathProcessor;\n    }\n\n    protected PathProcessor createPathProcessor() {\n        return new DefaultPathProcessor();\n    }\n\n    private ChecksumProcessor checksumProcessor;","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-testing/src/main/java/org/apache/maven/testing/plugin/stubs/RepositorySystemSupplier.java#L189-L225","documentation":"Error \"Supplier is closed\" thrown in apache/maven.","triggerScenarios":"Thrown at impl/maven-testing/src/main/java/org/apache/maven/testing/plugin/stubs/RepositorySystemSupplier.java:207 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}