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

Add missing Override annotation #6157

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

solth
Copy link
Member

@solth solth commented Jul 30, 2024

CodeQL reported:

Java enables you to annotate methods that are intended to override a method in a superclass. Compilers are required to generate an error if such an annotated method does not override a method in a superclass, which provides increased protection from potential defects. An annotated method also improves code readability.

This PR adds the missing annotation.

@solth solth changed the title Add missing 'Override' annotation Add missing Override annotation Jul 30, 2024
Copy link
Member

@stweil stweil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it required in SearchDatabaseService.java, too?

@stweil
Copy link
Member

stweil commented Jul 30, 2024

The build failure is unrelated to this PR (see issue #6138).

@solth
Copy link
Member Author

solth commented Aug 1, 2024

Is it required in SearchDatabaseService.java, too?

Yes, probably. Thanks for pointing this out. Since there seem to be many more corresponding notes for missing Override annotations according to CodeQL however (at least 178 in the last report), I will not change them all in this PR but rather add a seperate PR to tackle the problem more comprehensively when I have time. This PR was just opened because this particular missing annotation was just reported recently.

@solth solth merged commit 45b9930 into kitodo:master Aug 1, 2024
5 checks passed
@solth solth deleted the add-override-annotation branch August 1, 2024 08:04
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