{"record":{"id":"5efe5b8c49811b3f","repo":"apache/maven","slug":"directory-directory-does-not-exist","errorCode":null,"errorMessage":"Directory '${directory}' does not exist","messagePattern":"Directory '(.+?)' does not exist","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/CWD.java","lineNumber":75,"sourceCode":"     */\n    @Nonnull\n    public Path resolve(String seg) {\n        requireNonNull(seg, \"seg\");\n        return directory.resolve(seg).normalize();\n    }\n\n    /**\n     * Changes current cwd, if the new path is existing directory.\n     *\n     * @throws NullPointerException if {@code seg} is {@code null}.\n     * @throws IllegalArgumentException if {@code seg} leads to non-existent directory.\n     */\n    public void change(String seg) {\n        Path newCwd = resolve(seg);\n        if (Files.isDirectory(newCwd)) {\n            this.directory = newCwd;\n        } else {\n            throw new IllegalArgumentException(\"Directory '\" + directory + \"' does not exist\");\n        }\n    }\n}\n","sourceCodeStart":57,"sourceCodeEnd":79,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/CWD.java#L57-L79","documentation":"Error \"Directory '${directory}' does not exist\" thrown in apache/maven.","triggerScenarios":"Thrown at impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/CWD.java:75 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"}