Skip to content

Commit

Permalink
Fixed #6 compatibility of java.util.Objects.requireNonNull
Browse files Browse the repository at this point in the history
  • Loading branch information
drakeet committed Aug 5, 2016
1 parent 2078497 commit bc6d0d6
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import static java.util.Objects.requireNonNull;

/**
* @author drakeet
*/
Expand All @@ -46,7 +44,10 @@ public static class Builder {

/* optional */
public Builder setExtra(@Nullable String extra) {
this.extra = requireNonNull(extra);
if (extra == null) {
throw new NullPointerException("extra may not be null");
}
this.extra = extra;
return this;
}

Expand Down

0 comments on commit bc6d0d6

Please sign in to comment.