private HttpHandler handleDevelopmentModePersistentSessions(HttpHandler next, final DeploymentInfo deploymentInfo, final SessionManager sessionManager, final ServletContextImpl servletContext) {
final DevelopmentModeInfo developmentMode = deploymentInfo.getDevelopmentMode();
if (developmentMode != null) {
final SessionPersistenceManager sessionPersistenceManager = developmentMode.getSessionPersistenceManager();
if (sessionPersistenceManager != null) {
SessionRestoringHandler handler = new SessionRestoringHandler(deployment.getDeploymentInfo().getDeploymentName(), sessionManager, servletContext, next, sessionPersistenceManager);
deployment.addLifecycleObjects(handler);
return handler;
}
}
return next;