Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalCollection: fix "coincidence" naming #953

Closed
rfc2822 opened this issue Aug 3, 2024 · 0 comments · Fixed by #957
Closed

LocalCollection: fix "coincidence" naming #953

rfc2822 opened this issue Aug 3, 2024 · 0 comments · Fixed by #957
Assignees
Labels
refactoring Internal improvement of existing functions

Comments

@rfc2822
Copy link
Member

rfc2822 commented Aug 3, 2024

Currently, some implementations of the LocalCollection interface rely on the "coincidence" that LocalCollection has the same naming convention / method signatures as for instance the AndroidCalendar from ical4android. Example:

  • LocalCollection : fun delete(): Boolean
  • AndroidCalendar : fun delete(): Boolean

So a sub-class of AndroidCalendar implements LocalCollection "automatically".

This is not documented, error-prone (because if for instance the return value of delete in ical4android changes, DAVx⁵ compilation breaks) and bad design.

Possible solution: Different naming, for instance deleteCollection() in the interface, and then in LocalCalendar:

override deleteCollection() /* (from the interface) */ = delete() /* (from AndroidCalendar) */

etc.

@rfc2822 rfc2822 added the refactoring Internal improvement of existing functions label Aug 3, 2024
@sunkup sunkup moved this from Todo to In Progress in DAVx⁵ Releases Aug 6, 2024
@sunkup sunkup linked a pull request Aug 6, 2024 that will close this issue
4 tasks
@sunkup sunkup moved this from In Progress to In Review in DAVx⁵ Releases Aug 6, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in DAVx⁵ Releases Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Internal improvement of existing functions
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants