apache / apache/maven

Noun method names in XmlNode

Open
#11,582 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

### Affected version

4.x

### Bug description

For inobvious reasons methods that follow Java conventions like getChild and getValue have been deprecated and replaced with methods that don't like child() and value(). This is confusing and unnecessary churn. Revert this.

One can argue about the wisdom of Java's well-established naming conventions, but individual projects like Maven should not needlessly deviate from those for personal preference. It's far easier to stick with existing convention than for every project to pave its own way.

And yes, Oracle did a half-assed job when they added records to the language in Java 17 without considering the impact on naming conventions for existing code. That neither conformed to nor changed existing conventions for non-record classes and interfaces.

Contributor guide

Open the contributing guide

Research direction

Start by locating XmlNode and the deprecated getChild and getValue methods in the Maven source, then inspect nearby tests and references to determine the affected API surface. Done means the noun-style method names are restored consistently and the relevant test suite passes without breaking existing callers.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.