}
if (token != null) {
long age = System.currentTimeMillis() - token.getCreated();
if (age <= MAX_TOKEN_AGE) {
return token;
<BUG>}
getDao().delete(token);</BUG>
log.severe("Token is outdated, so deleted: " + id);
<BUG>throw new DatabaseException(ProblemType.TOKEN_OUTDATED);
}</BUG>
return null;

}
if (token != null) {
long age = System.currentTimeMillis() - token.getCreated();
if (age <= MAX_TOKEN_AGE) {
return token;
} else {
getDao().delete(token);
log.severe("Token is outdated, so deleted: " + id);
throw new DatabaseException(ProblemType.TOKEN_OUTDATED);
}
}
