SessionRepository.save returns S

Issue gh-809
This commit is contained in:
Rob Winch
2017-06-22 17:30:40 -05:00
parent 233d179bfa
commit cd8686ae9c
5 changed files with 9 additions and 5 deletions

View File

@@ -76,8 +76,9 @@ public class MapSessionRepository implements SessionRepository<Session> {
this.defaultMaxInactiveInterval = Integer.valueOf(defaultMaxInactiveInterval);
}
public void save(Session session) {
public Session save(Session session) {
this.sessions.put(session.getId(), new MapSession(session));
return session;
}
public Session getSession(String id) {

View File

@@ -52,7 +52,7 @@ public interface SessionRepository<S extends Session> {
*
* @param session the {@link Session} to save
*/
void save(S session);
S save(S session);
/**
* Gets the {@link Session} by the {@link Session#getId()} or null if no