Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 3ab96ee

Browse files
committed
Remove unused code.
1 parent aa67f52 commit 3ab96ee

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

appengine-jetty-managed-runtime/src/main/java/com/google/apphosting/runtime/jetty9/SessionManager.java

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,15 @@ public class SessionManager extends AbstractSessionManager {
8282
// SecureRandom class.
8383
public static class SessionIdManager extends HashSessionIdManager {
8484

85-
private SessionManager manager;
86-
8785

8886
/**
8987
* NOTE this breaks the standard jetty contract that there is only 1
9088
* SessionIdManager per server instance, and 1 SessionManager instance
9189
* per context.
9290
* @param manager
9391
*/
94-
public SessionIdManager(SessionManager manager) {
92+
public SessionIdManager() {
9593
super(new SecureRandom());
96-
this.manager = manager;
9794
}
9895

9996
/**
@@ -122,18 +119,7 @@ public String generateNewId () {
122119
logger.fine("Created a random session identifier: " + id);
123120
return id;
124121
}
125-
126-
127-
@Override
128-
public void renewSessionId(String oldClusterId, String oldNodeId, HttpServletRequest request) {
129-
// generate a new id
130-
String newClusterId = newSessionId(request.hashCode());
131-
132-
// tell session manager to update the id
133-
manager.renewSessionId(oldClusterId, oldNodeId, newClusterId, getNodeId(newClusterId, request));
134-
}
135-
136-
122+
137123
}
138124

139125
/**
@@ -406,7 +392,7 @@ public SessionManager(List<SessionStore> sessionStoresInWriteOrder) {
406392

407393
//NOTE: this breaks the standard jetty contract that a single server has a single SessionIdManager
408394
//but there is 1 SessionManager per context.
409-
_sessionIdManager = new SessionIdManager(this);
395+
_sessionIdManager = new SessionIdManager();
410396
}
411397

412398
@Override

appengine-jetty-managed-runtime/src/test/java/com/google/apphosting/runtime/jetty9/SessionManagerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public void tearDown() throws Exception {
206206
public void testIdGeneration() {
207207
long timestamp = System.currentTimeMillis();
208208

209-
SessionManager.SessionIdManager idManager = new SessionManager.SessionIdManager(manager);
209+
SessionManager.SessionIdManager idManager = new SessionManager.SessionIdManager();
210210
HttpServletRequest mockRequest = makeMockRequest(false);
211211
replay(mockRequest);
212212
String sessionid = idManager.newSessionId(mockRequest, timestamp);

0 commit comments

Comments
 (0)