{"record":{"id":"192c1366a2443527","repo":"apache/maven","slug":"not-implemented-yet-192c13","errorCode":null,"errorMessage":"Not implemented yet","messagePattern":"Not implemented yet","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultNode.java","lineNumber":76,"sourceCode":"    @Override\n    public Dependency getDependency() {\n        return node.getDependency() != null ? session.getDependency(node.getDependency()) : null;\n    }\n\n    @Override\n    public List<Node> getChildren() {\n        return new MappedList<>(node.getChildren(), n -> session.getNode(n, verbose));\n    }\n\n    @Override\n    public List<RemoteRepository> getRemoteRepositories() {\n        return new MappedList<>(node.getRepositories(), session::getRemoteRepository);\n    }\n\n    @Override\n    public Optional<RemoteRepository> getRepository() {\n        // TODO: v4: implement\n        throw new UnsupportedOperationException(\"Not implemented yet\");\n    }\n\n    /**\n     * Returns a detailed string representation of this dependency node.\n     * <p>\n     * When verbose mode is disabled, returns the basic string representation in the format:\n     * {@code groupId:artifactId:version[:scope]}\n     * <p>\n     * When verbose mode is enabled, additional details are included with the following format:\n     * <ul>\n     *   <li>For included dependencies: {@code groupId:artifactId:version[:scope] (details)}</li>\n     *   <li>For omitted dependencies: {@code (groupId:artifactId:version[:scope] - details)}</li>\n     * </ul>\n     * Where details may include:\n     * <ul>\n     *   <li>Version management information (if the version was managed from a different version)</li>\n     *   <li>Scope management information (if the scope was managed from a different scope)</li>\n     *   <li>Scope updates (if the scope was changed during resolution)</li>","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultNode.java#L58-L94","documentation":"DefaultNode.getRepository() is declared on the dependency Node API but is not implemented in Maven's default implementation - the method body is marked 'TODO: v4: implement' and unconditionally throws UnsupportedOperationException. Every call fails regardless of node state; no repository attribution data is wired up yet.","triggerScenarios":"Calling getRepository() on a Node obtained through the Maven 4 session API: session.getNode(...), dependency graph results, or elements of DefaultNode.getChildren().","commonSituations":"Plugins and extensions ported to the Maven 4 API that want to know which repository an artifact was resolved from; tooling that walks dependency graphs and assumes every interface method is functional.","solutions":["Do not call Node.getRepository() on Maven 4 - the implementation is pending","Use getRemoteRepositories() (implemented) to get the candidate repository set for the node","Keep repository attribution in your own code by correlating resolved artifacts with the resolution request","Track upstream Maven development for the v4 implementation before relying on this method"],"exampleFix":"// before\nOptional<RemoteRepository> repo = node.getRepository(); // throws UnsupportedOperationException\n\n// after\nList<RemoteRepository> candidates = node.getRemoteRepositories();","handlingStrategy":"fallback","validationCode":null,"typeGuard":"static boolean repositorySupported(Node node) {\n    // DefaultNode.getRepository() is a TODO in Maven 4 and always throws\n    return !(node instanceof org.apache.maven.impl.DefaultNode);\n}","tryCatchPattern":"try {\n    node.getRepository();\n} catch (UnsupportedOperationException e) {\n    // Maven 4: not implemented; fall back to the candidate repository list\n    List<RemoteRepository> candidates = node.getRemoteRepositories();\n}","preventionTips":["Audit plugin and extension code for getRepository() calls before running on Maven 4","Prefer getRemoteRepositories(), which is implemented and returns the candidate set","Keep repository attribution in your own resolution bookkeeping"],"tags":["maven","maven-4","dependency-graph","not-implemented"],"backgroundTag":"unsupported-operation","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}