Add missing @Nullable to setters of Nullable Fields
There are setters and builder methods that initialize members that are
`@Nullable` but do not accept `@Nullable` parameters.
For example:
```
private @Nullable Object foo;
public void setFoo(Object foo) {
this.foo = foo;
}
```
It is an unnecessary restriction that the parameter is unable to be null
since the field can be null.
This commit fixes these inconsistencies.
Closes gh-18618
This commit is contained in:
@@ -122,7 +122,7 @@ public final class RequiredFactor {
|
||||
* @param authority the authority.
|
||||
* @return the builder.
|
||||
*/
|
||||
public Builder authority(String authority) {
|
||||
public Builder authority(@Nullable String authority) {
|
||||
this.authority = authority;
|
||||
return this;
|
||||
}
|
||||
@@ -205,7 +205,7 @@ public final class RequiredFactor {
|
||||
* @param validDuration the {@link Duration}.
|
||||
* @return
|
||||
*/
|
||||
public Builder validDuration(Duration validDuration) {
|
||||
public Builder validDuration(@Nullable Duration validDuration) {
|
||||
this.validDuration = validDuration;
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user