Skip to content

Commit 4895dff

Browse files
committed
Add check of the constructor parameters. They can't be null
1 parent f0518fa commit 4895dff

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

core/src/main/java/com/auth0/authentication/Authentication.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@
2828
import com.auth0.Token;
2929
import com.auth0.UserProfile;
3030

31+
import static com.auth0.authentication.api.util.CheckHelper.checkArgument;
32+
3133
public class Authentication {
3234

3335
private final UserProfile profile;
3436
private final Token token;
3537

3638
public Authentication(UserProfile profile, Token token) {
39+
checkArgument(profile != null, "profile must be non-null");
40+
checkArgument(token != null, "token must be non-null");
3741
this.profile = profile;
3842
this.token = token;
3943
}

0 commit comments

Comments
 (0)