Skip to content

Incorrect "field not initialized" warning for properties in @NullMarked interfaces #705

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

Open
EotT123 opened this issue May 10, 2025 · 0 comments

Comments

@EotT123
Copy link
Contributor

EotT123 commented May 10, 2025

When defining a property in an interface annotated with @org.jspecify.annotations.NullMarked, IntelliJ incorrectly reports that the property must be initialized. The inspection assumes it is a field, but it's actually an implicit getter/setter.

@NullMarked
public interface Test {
    @val String test; // WARNING: @NullMarked fields must be initialized
}
EotT123 pushed a commit to EotT123/manifold-test that referenced this issue May 10, 2025
EotT123 pushed a commit to EotT123/manifold-test that referenced this issue May 23, 2025
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

No branches or pull requests

1 participant