From e2c2cf416db9637ebd41c489cf5a533824d17d4c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 1 Nov 2017 12:55:21 +0300 Subject: notifications: fix tokens deletion --- juick-core/src/main/java/com/juick/ExternalToken.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'juick-core/src') diff --git a/juick-core/src/main/java/com/juick/ExternalToken.java b/juick-core/src/main/java/com/juick/ExternalToken.java index 933ecf82..f6094478 100644 --- a/juick-core/src/main/java/com/juick/ExternalToken.java +++ b/juick-core/src/main/java/com/juick/ExternalToken.java @@ -38,6 +38,12 @@ public class ExternalToken { this.type = type; this.token = token; this.secret = secret; + if (this.type == null) { + throw new IllegalStateException("Token must have type"); + } + if (this.token == null) { + throw new IllegalStateException("Token must have value"); + } } public String getType() { -- cgit v1.2.3