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

[FEATURE] add jsr305 annotations to built classes #2292

Open
xenoterracide opened this issue Nov 20, 2019 · 0 comments
Open

[FEATURE] add jsr305 annotations to built classes #2292

xenoterracide opened this issue Nov 20, 2019 · 0 comments

Comments

@xenoterracide
Copy link

xenoterracide commented Nov 20, 2019

Describe the feature

@Builder
class Foo {

    @NonNull
    private final String bar;
}
...
public FoleyConnectionEvent.FoleyConnectionEventBuilder gatewayId(@NonNull @Nonnull final String gatewayId) {
            if (gatewayId == null) {
                throw new NullPointerException("gatewayId is marked non-null but is null");
            } else {
                this.gatewayId = gatewayId;
                return this;
            }
        }

Describe the target audience
anyone trying to emulate kotlins null safety

Additional context
a bug within a null checker
uber/NullAway#321

might also be worth it to add some support for different annotations, like a lombok property to add annotations to the generated classes

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