Session.delete -> deleteById

Fixes gh-809
This commit is contained in:
Rob Winch
2017-06-22 21:24:20 -05:00
parent 0127ef9f9b
commit c6c6beb40c
14 changed files with 25 additions and 25 deletions

View File

@@ -87,13 +87,13 @@ public class MapSessionRepository implements SessionRepository<Session> {
return null;
}
if (saved.isExpired()) {
delete(saved.getId());
deleteById(saved.getId());
return null;
}
return new MapSession(saved);
}
public void delete(String id) {
public void deleteById(String id) {
this.sessions.remove(id);
}

View File

@@ -69,5 +69,5 @@ public interface SessionRepository<S extends Session> {
* if the {@link Session} is not found.
* @param id the {@link org.springframework.session.Session#getId()} to delete
*/
void delete(String id);
void deleteById(String id);
}

View File

@@ -284,7 +284,7 @@ public class SessionRepositoryFilter<S extends Session>
attrs.put(attrName, value);
}
SessionRepositoryFilter.this.sessionRepository.delete(session.getId());
SessionRepositoryFilter.this.sessionRepository.deleteById(session.getId());
HttpSessionWrapper original = getCurrentSession();
setCurrentSession(null);
@@ -413,7 +413,7 @@ public class SessionRepositoryFilter<S extends Session>
super.invalidate();
SessionRepositoryRequestWrapper.this.requestedSessionInvalidated = true;
setCurrentSession(null);
SessionRepositoryFilter.this.sessionRepository.delete(getId());
SessionRepositoryFilter.this.sessionRepository.deleteById(getId());
}
}
}