package io.dropwizard.jersey.validation;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.dropwizard.validation.selfvalidating.SelfValidating;
import io.dropwizard.validation.selfvalidating.SelfValidation;
import io.dropwizard.validation.selfvalidating.ViolationCollector;

import javax.validation.constraints.NotNull;
import javax.ws.rs.QueryParam;

@SelfValidating
public class SelfValidatingClass {

    @JsonProperty
    private Integer answer;

    public SelfValidatingClass() { }

    public SelfValidatingClass(@NotNull @QueryParam("answer") Integer answer) {
        this.answer = answer;
    }


    @SelfValidation
    public void validate(ViolationCollector collector) {
        if (!answer.equals(42)) {
            collector.addViolation("The answer is 42");
        }
    }

}

@@ -283,16 +283,50 @@
 ector;%0A%0A
+import javax.annotation.Nullable;%0A
 import j
@@ -446,16 +446,30 @@
 lass %7B%0A%0A
+    @Nullable%0A
     @Jso
@@ -752,16 +752,34 @@
     if (
+answer == null %7C%7C 
 !answer.

Fix NullAway issues