nullsafe check for refresh

pull/306/merge
Justin Richer 2013-03-06 11:32:36 -05:00
parent 4c3c2dce52
commit 87c8672948
1 changed files with 5 additions and 1 deletions

View File

@ -250,7 +250,11 @@ public class ClientDetailsEntity implements ClientDetails {
*/
@Transient
public boolean isAllowRefresh() {
return getAuthorizedGrantTypes().contains("refresh_token");
if (grantTypes != null) {
return getAuthorizedGrantTypes().contains("refresh_token");
} else {
return false; // if there are no grants, we can't be refreshing them, can we?
}
}
@Basic