shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lhazlew...@apache.org
Subject svn commit: r801346 - in /incubator/shiro/trunk: core/src/main/java/org/apache/shiro/session/mgt/DelegatingSession.java web/src/main/java/org/apache/shiro/web/session/DelegatingWebSessionManager.java
Date Wed, 05 Aug 2009 18:19:49 GMT
Author: lhazlewood
Date: Wed Aug  5 18:19:48 2009
New Revision: 801346

URL: http://svn.apache.org/viewvc?rev=801346&view=rev
Log:
Removed last remnant of ReplacedSessionException logic

Modified:
    incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/DelegatingSession.java
    incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/session/DelegatingWebSessionManager.java

Modified: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/DelegatingSession.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/DelegatingSession.java?rev=801346&r1=801345&r2=801346&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/DelegatingSession.java
(original)
+++ incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/DelegatingSession.java
Wed Aug  5 18:19:48 2009
@@ -52,7 +52,6 @@
     //cached fields to avoid a server-side method call if out-of-process:
     private Date startTimestamp = null;
     private InetAddress hostAddress = null;
-    private boolean handleReplacedSessions = true;
 
     /**
      * Handle to a server-side SessionManager.  See {@link #setSessionManager} for details.
@@ -64,16 +63,19 @@
     }
 
     public DelegatingSession(SessionManager sessionManager, Serializable id) {
+        if (sessionManager == null) {
+            throw new IllegalArgumentException("sessionManager argument cannot be null.");
+        }
+        if (id == null) {
+            throw new IllegalArgumentException("session id argument cannot be null.");
+        }
         this.sessionManager = sessionManager;
         this.id = id;
     }
 
-    public DelegatingSession(SessionManager sessionManager, Serializable id,
-                             InetAddress hostAddress, boolean handleReplacedSessions) {
-        this.sessionManager = sessionManager;
-        this.id = id;
+    public DelegatingSession(SessionManager sessionManager, Serializable id, InetAddress
hostAddress) {
+        this(sessionManager, id);
         this.hostAddress = hostAddress;
-        this.handleReplacedSessions = handleReplacedSessions;
     }
 
     /**
@@ -107,14 +109,6 @@
         this.sessionManager = sessionManager;
     }
 
-    public boolean isHandleReplacedSessions() {
-        return handleReplacedSessions;
-    }
-
-    public void setHandleReplacedSessions(boolean handleReplacedSessions) {
-        this.handleReplacedSessions = handleReplacedSessions;
-    }
-
     /**
      * Sets the sessionId used by this handle for all future {@link SessionManager SessionManager}
      * method invocations.

Modified: incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/session/DelegatingWebSessionManager.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/session/DelegatingWebSessionManager.java?rev=801346&r1=801345&r2=801346&view=diff
==============================================================================
--- incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/session/DelegatingWebSessionManager.java
(original)
+++ incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/session/DelegatingWebSessionManager.java
Wed Aug  5 18:19:48 2009
@@ -120,7 +120,7 @@
         //get the host address and bind it to the thread.  This call will both validate the
session as well as
         //make it accessible for futher host checks:
         InetAddress host = this.delegateSessionManager.getHostAddress(id);
-        session = new DelegatingSession(this.delegateSessionManager, id, host, false);
+        session = new DelegatingSession(this.delegateSessionManager, id, host);
         log.trace("Cached the session retrieved from the datasource in a thread-local for
continued thread access.");
         ThreadContext.put(THREAD_CONTEXT_SESSION_KEY, session);
 



Mime
View raw message