Skip to content

Comments

Fix #133: Rename get* methods for naming consistency#144

Open
gnodet wants to merge 1 commit intomainfrom
fix/133-naming-consistency
Open

Fix #133: Rename get* methods for naming consistency#144
gnodet wants to merge 1 commit intomainfrom
fix/133-naming-consistency

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Feb 21, 2026

Summary

  • Rename all get* getters to match the project's no-prefix convention:
    • ContainerNode: getNode(int)node(int)
    • QuoteStyle: getCharacter()character()
    • Serializer: getIndentString()indentString(), getLineEnding()lineEnding(), getEmptyElementStyle()emptyElementStyle()
    • DomTripException: getPosition()position(), getXmlContent()xmlContent()
  • Old method names are kept as @Deprecated delegates for backward compatibility

BREAKING CHANGE: get* getter methods have been renamed. The old names are deprecated but still functional.

Test plan

  • All call sites updated to new names
  • Deprecated delegates still work
  • All existing tests pass

Closes #133

Rename all get* getters to match the project's no-prefix convention:
- ContainerNode: getNode(int) -> node(int)
- QuoteStyle: getCharacter() -> character()
- Serializer: getIndentString() -> indentString()
- Serializer: getLineEnding() -> lineEnding()
- Serializer: getEmptyElementStyle() -> emptyElementStyle()
- DomTripException: getPosition() -> position()
- DomTripException: getXmlContent() -> xmlContent()

Old method names are kept as @deprecated delegates for backward
compatibility.

BREAKING CHANGE: get* getter methods have been renamed. The old names
are deprecated but still functional.
@github-actions
Copy link

✅ CI Build PASSED

Build Status: PASSED
Java Version: 21
Maven Command: ./mvnw verify

🎉 All tests passed! The build is ready for merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Naming: ContainerNode.*node(*) vs. Element.child*(*)

1 participant