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

Refactor interface hierarchy to avoid unnecessary casting #382

Merged
merged 1 commit into from
Feb 24, 2024

Conversation

guillermocalvo
Copy link
Collaborator

Given that:

  1. All current implementations of JApiHasAnnotations and JApiHasGenericTemplates implement JApiCompatibility as well.
  2. Code in CompatibilityChanges assumes that any such instances can be safely casted to JApiCompatibility.

I believe that we can say that, by definition, all instances of JApiHasAnnotations and JApiHasGenericTemplates must be a JApiCompatibility.

So I think these two interfaces should extend JApiCompatibility to clarify this relationship and to avoid unnecessary type casting.

@siom79 siom79 merged commit 8821891 into siom79:master Feb 24, 2024
6 checks passed
@guillermocalvo guillermocalvo deleted the extend-compatibility-interface branch February 24, 2024 14:31
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.

2 participants