Update documentation to exclude static methods from `@OverrideOnly` by JojOatXGME · Pull Request #120 · JetBrains/java-annotations · GitHub
Skip to content

Update documentation to exclude static methods from @OverrideOnly#120

Merged
Tagir Valeev (amaembo) merged 1 commit into
JetBrains:masterfrom
JojOatXGME:override-only-static
Feb 10, 2025
Merged

Update documentation to exclude static methods from @OverrideOnly#120
Tagir Valeev (amaembo) merged 1 commit into
JetBrains:masterfrom
JojOatXGME:override-only-static

Conversation

@JojOatXGME

@JojOatXGME Johannes Spangenberg (JojOatXGME) commented Feb 9, 2025

Copy link
Copy Markdown
Contributor

Update Javadoc of @OverrideOnly to exclude static methods. While this can technically be considered a semantic change of the annotation, it only removes nonsensical warnings.

Screenshot showing a warning at a call site of the static method LeafOccurrenceMapper.withPointer, reporting that the method can only be overridden.

A warning reporting that a static method (e.g. LeafOccurrenceMapper.withPointer) can only be overridden is rather strange, considering that such method is generally impossible to override.

Related

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