forked from Fascinated/Bat
fix npe
This commit is contained in:
parent
8cc465e53d
commit
35b8fff808
@ -113,7 +113,7 @@ public class PremiumProfile extends Serializable {
|
|||||||
public void load(Document document, Gson gson) {
|
public void load(Document document, Gson gson) {
|
||||||
this.activatedAt = (Date) document.getOrDefault("activatedAt", new Date());
|
this.activatedAt = (Date) document.getOrDefault("activatedAt", new Date());
|
||||||
this.expiresAt = (Date) document.getOrDefault("expiresAt", null);
|
this.expiresAt = (Date) document.getOrDefault("expiresAt", null);
|
||||||
this.type = document.containsKey("type") ? Type.valueOf(document.getString("type")) : null;
|
this.type = document.getString("type") != null ? Type.valueOf(document.getString("type")) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user