Skip to content

Commit

Permalink
Add reproducer for spotbugs#772
Browse files Browse the repository at this point in the history
  • Loading branch information
ahubold committed Oct 11, 2018
1 parent 429b399 commit 2c1bd4d
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package nullnessAnnotations;

import edu.umd.cs.findbugs.annotations.NoWarning;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;

/**
* Reproducer for https://github.com/spotbugs/spotbugs/issues/772
*/
public class NonNullParameterOfInnerClassConstructor {

private class Inner {
private final String a;
private final Object b;

@NoWarning("NP")
Inner(@NonNull String a, @Nullable Object b) {
this.a = a.toLowerCase();
this.b = b;
}

}
}

0 comments on commit 2c1bd4d

Please sign in to comment.