Skip to content

Refactor Formatter and FieldFormatterCleanups for clearer structure and simpler class responsibilities #14280

@EricW123

Description

@EricW123

Is your suggestion for improvement related to a problem? Please describe.
Some logic in org.jabref.logic.cleanup is placed in the wrong layer or mixes responsibilities:

  • Formatter is a base class for string formatters but lives in the cleanup package.
  • FieldFormatterCleanups handles both parsing/serialization and cleanup execution

Describe the solution you'd like

  • Move Formatter to org.jabref.logic.formatter.
  • Refactor and rename FieldFormatterCleanups and extract its parsing logic to a small helper like FieldFormatterCleanupParser.
  • Keep public behavior unchanged.

Additional context
This is a small, non-functional refactor touching mainly:

  • Formatter.java (moved)
  • FieldFormatterCleanups.java (renamed + internal refactor)
    with only minor import updates in related logic and test

Metadata

Metadata

Assignees

Labels

dev: code-qualityIssues related to code or architecture decisions📌 Pinned📍 AssignedAssigned by assign-issue-action (or manually assigned)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions