Author: markt
Date: Sun Oct 24 13:01:28 2010
New Revision: 1026782
URL: http://svn.apache.org/viewvc?rev=1026782&view=rev
Log:
Allow Checkstyle's unused imports test to be used with the o.a.catalina.session
package
Fix some Eclipse warnings
Modified:
tomcat/trunk/java/org/apache/catalina/session/FileStore.java
tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java
tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java
tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java
tomcat/trunk/java/org/apache/catalina/session/StandardManager.java
tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
tomcat/trunk/java/org/apache/catalina/session/StandardSessionFacade.java
tomcat/trunk/java/org/apache/catalina/session/StoreBase.java
Modified: tomcat/trunk/java/org/apache/catalina/session/FileStore.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/FileStore.java?rev=1026782&r1=1026781&r2=1026782&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/FileStore.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/FileStore.java Sun Oct 24
13:01:28 2010
@@ -155,6 +155,7 @@ public final class FileStore extends Sto
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public int getSize() throws IOException {
// Acquire the list of files in our storage directory
@@ -184,6 +185,7 @@ public final class FileStore extends Sto
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public void clear()
throws IOException {
@@ -202,6 +204,7 @@ public final class FileStore extends Sto
*
* @exception IOException if an input/output error occurred
*/
+ @Override
public String[] keys() throws IOException {
// Acquire the list of files in our storage directory
@@ -240,6 +243,7 @@ public final class FileStore extends Sto
* @exception ClassNotFoundException if a deserialization error occurs
* @exception IOException if an input/output error occurs
*/
+ @Override
public Session load(String id)
throws ClassNotFoundException, IOException {
@@ -322,6 +326,7 @@ public final class FileStore extends Sto
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public void remove(String id) throws IOException {
File file = file(id);
@@ -345,6 +350,7 @@ public final class FileStore extends Sto
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public void save(Session session) throws IOException {
// Open an output stream to the specified pathname, if any
Modified: tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java?rev=1026782&r1=1026781&r2=1026782&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java Sun Oct 24
13:01:28 2010
@@ -38,7 +38,6 @@ import org.apache.catalina.LifecycleExce
import org.apache.catalina.Loader;
import org.apache.catalina.Session;
import org.apache.catalina.util.CustomObjectInputStream;
-import org.apache.catalina.util.LifecycleBase;
import org.apache.tomcat.util.ExceptionUtils;
/**
@@ -443,6 +442,7 @@ public class JDBCStore extends StoreBase
*
* @exception IOException if an input/output error occurred
*/
+ @Override
public String[] keys() throws IOException {
ResultSet rst = null;
String keys[] = null;
@@ -504,6 +504,7 @@ public class JDBCStore extends StoreBase
*
* @exception IOException if an input/output error occurred
*/
+ @Override
public int getSize() throws IOException {
int size = 0;
ResultSet rst = null;
@@ -561,6 +562,7 @@ public class JDBCStore extends StoreBase
* @exception ClassNotFoundException if an error occurs
* @exception IOException if an input/output error occurred
*/
+ @Override
public Session load(String id)
throws ClassNotFoundException, IOException {
ResultSet rst = null;
@@ -657,6 +659,7 @@ public class JDBCStore extends StoreBase
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public void remove(String id) throws IOException {
synchronized (this) {
@@ -702,6 +705,7 @@ public class JDBCStore extends StoreBase
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public void clear() throws IOException {
synchronized (this) {
@@ -741,6 +745,7 @@ public class JDBCStore extends StoreBase
* @param session the session to be stored
* @exception IOException if an input/output error occurs
*/
+ @Override
public void save(Session session) throws IOException {
ObjectOutputStream oos = null;
ByteArrayOutputStream bos = null;
@@ -963,7 +968,7 @@ public class JDBCStore extends StoreBase
/**
* Start this component and implement the requirements
- * of {...@link LifecycleBase#startInternal()}.
+ * of {...@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
@@ -979,7 +984,7 @@ public class JDBCStore extends StoreBase
/**
* Stop this component and implement the requirements
- * of {...@link LifecycleBase#stopInternal()}.
+ * of {...@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
Modified: tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java?rev=1026782&r1=1026781&r2=1026782&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java Sun Oct 24
13:01:28 2010
@@ -239,6 +239,7 @@ public abstract class ManagerBase extend
devRandomSource = s;
}
+ @Override
public DataInputStream run(){
try {
File f=new File( devRandomSource );
@@ -294,6 +295,7 @@ public abstract class ManagerBase extend
/**
* Return the Container with which this Manager is associated.
*/
+ @Override
public Container getContainer() {
return (this.container);
@@ -306,6 +308,7 @@ public abstract class ManagerBase extend
*
* @param container The newly associated Container
*/
+ @Override
public void setContainer(Container container) {
// De-register from the old Container (if any)
@@ -372,6 +375,7 @@ public abstract class ManagerBase extend
* Return the distributable flag for the sessions supported by
* this Manager.
*/
+ @Override
public boolean getDistributable() {
return (this.distributable);
@@ -386,6 +390,7 @@ public abstract class ManagerBase extend
*
* @param distributable The new distributable flag
*/
+ @Override
public void setDistributable(boolean distributable) {
boolean oldDistributable = this.distributable;
@@ -453,6 +458,7 @@ public abstract class ManagerBase extend
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
@@ -464,6 +470,7 @@ public abstract class ManagerBase extend
* Return the default maximum inactive interval (in seconds)
* for Sessions created by this Manager.
*/
+ @Override
public int getMaxInactiveInterval() {
return (this.maxInactiveInterval);
@@ -477,6 +484,7 @@ public abstract class ManagerBase extend
*
* @param interval The new default value
*/
+ @Override
public void setMaxInactiveInterval(int interval) {
int oldMaxInactiveInterval = this.maxInactiveInterval;
@@ -494,6 +502,7 @@ public abstract class ManagerBase extend
*
* @return The session id length
*/
+ @Override
public int getSessionIdLength() {
return (this.sessionIdLength);
@@ -507,6 +516,7 @@ public abstract class ManagerBase extend
*
* @param idLength The session id length
*/
+ @Override
public void setSessionIdLength(int idLength) {
int oldSessionIdLength = this.sessionIdLength;
@@ -644,6 +654,7 @@ public abstract class ManagerBase extend
*
* @return The count
*/
+ @Override
public int getRejectedSessions() {
return rejectedSessions;
}
@@ -653,6 +664,7 @@ public abstract class ManagerBase extend
*
* @return Number of sessions that have expired
*/
+ @Override
public long getExpiredSessions() {
return expiredSessions;
}
@@ -663,6 +675,7 @@ public abstract class ManagerBase extend
*
* @param expiredSessions Number of sessions that have expired
*/
+ @Override
public void setExpiredSessions(long expiredSessions) {
this.expiredSessions = expiredSessions;
}
@@ -709,6 +722,7 @@ public abstract class ManagerBase extend
/**
* Implements the Manager interface, direct call to processExpires
*/
+ @Override
public void backgroundProcess() {
count = (count + 1) % processExpiresFrequency;
if (count == 0)
@@ -769,6 +783,7 @@ public abstract class ManagerBase extend
*
* @param session Session to be added
*/
+ @Override
public void add(Session session) {
sessions.put(session.getIdInternal(), session);
@@ -788,6 +803,7 @@ public abstract class ManagerBase extend
*
* @param listener The listener to add
*/
+ @Override
public void addPropertyChangeListener(PropertyChangeListener listener) {
support.addPropertyChangeListener(listener);
@@ -808,6 +824,7 @@ public abstract class ManagerBase extend
* @exception IllegalStateException if a new session cannot be
* instantiated for any reason
*/
+ @Override
public Session createSession(String sessionId) {
if ((maxActiveSessions >= 0) &&
@@ -842,6 +859,7 @@ public abstract class ManagerBase extend
* The PersistentManager manager does not need to create session data
* because it reads it from the Store.
*/
+ @Override
public Session createEmptySession() {
return (getNewSession());
}
@@ -858,6 +876,7 @@ public abstract class ManagerBase extend
* @exception IOException if an input/output error occurs while
* processing this request
*/
+ @Override
public Session findSession(String id) throws IOException {
if (id == null)
@@ -871,6 +890,7 @@ public abstract class ManagerBase extend
* Return the set of active Sessions associated with this Manager.
* If this Manager has no active Sessions, a zero-length array is returned.
*/
+ @Override
public Session[] findSessions() {
return sessions.values().toArray(new Session[0]);
@@ -883,6 +903,7 @@ public abstract class ManagerBase extend
*
* @param session Session to be removed
*/
+ @Override
public void remove(Session session) {
sessions.remove(session.getIdInternal());
@@ -895,6 +916,7 @@ public abstract class ManagerBase extend
*
* @param listener The listener to remove
*/
+ @Override
public void removePropertyChangeListener(PropertyChangeListener listener) {
support.removePropertyChangeListener(listener);
@@ -908,6 +930,7 @@ public abstract class ManagerBase extend
*
* @param session The session to change the session ID for
*/
+ @Override
public void changeSessionId(Session session) {
session.setId(generateSessionId());
}
@@ -1033,6 +1056,7 @@ public abstract class ManagerBase extend
// -------------------------------------------------------- Package Methods
+ @Override
public void setSessionCounter(long sessionCounter) {
this.sessionCounter = sessionCounter;
}
@@ -1043,6 +1067,7 @@ public abstract class ManagerBase extend
*
* @return sessions created
*/
+ @Override
public long getSessionCounter() {
return sessionCounter;
}
@@ -1069,6 +1094,7 @@ public abstract class ManagerBase extend
*
* @return number of sessions active
*/
+ @Override
public int getActiveSessions() {
return sessions.size();
}
@@ -1079,11 +1105,13 @@ public abstract class ManagerBase extend
*
* @return The highest number of concurrent active sessions
*/
+ @Override
public int getMaxActive() {
return maxActive;
}
+ @Override
public void setMaxActive(int maxActive) {
synchronized (maxActiveUpdateLock) {
this.maxActive = maxActive;
@@ -1126,6 +1154,7 @@ public abstract class ManagerBase extend
* @return Longest time (in seconds) that an expired session had been
* alive.
*/
+ @Override
public int getSessionMaxAliveTime() {
return sessionMaxAliveTime;
}
@@ -1138,6 +1167,7 @@ public abstract class ManagerBase extend
* @param sessionMaxAliveTime Longest time (in seconds) that an expired
* session had been alive.
*/
+ @Override
public void setSessionMaxAliveTime(int sessionMaxAliveTime) {
this.sessionMaxAliveTime = sessionMaxAliveTime;
}
@@ -1150,6 +1180,7 @@ public abstract class ManagerBase extend
* @return Average time (in seconds) that expired sessions had been
* alive.
*/
+ @Override
public int getSessionAverageAliveTime() {
return sessionAverageAliveTime;
}
@@ -1162,6 +1193,7 @@ public abstract class ManagerBase extend
* @param sessionAverageAliveTime Average time (in seconds) that expired
* sessions had been alive.
*/
+ @Override
public void setSessionAverageAliveTime(int sessionAverageAliveTime) {
this.sessionAverageAliveTime = sessionAverageAliveTime;
}
@@ -1356,6 +1388,7 @@ public abstract class ManagerBase extend
* @param event
* The property change event that has occurred
*/
+ @Override
public void propertyChange(PropertyChangeEvent event) {
// Validate the source of this event
Modified:
tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java?rev=1026782&r1=1026781&r2=1026782&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java
Sun Oct 24 13:01:28 2010
@@ -31,7 +31,6 @@ import org.apache.catalina.LifecycleStat
import org.apache.catalina.Session;
import org.apache.catalina.Store;
import org.apache.catalina.security.SecurityUtil;
-import org.apache.catalina.util.LifecycleBase;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
/**
@@ -61,6 +60,7 @@ public abstract class PersistentManagerB
// NOOP
}
+ @Override
public Void run() throws Exception{
store.clear();
return null;
@@ -76,6 +76,7 @@ public abstract class PersistentManagerB
this.id = id;
}
+ @Override
public Void run() throws Exception{
store.remove(id);
return null;
@@ -91,6 +92,7 @@ public abstract class PersistentManagerB
this.id = id;
}
+ @Override
public Session run() throws Exception{
return store.load(id);
}
@@ -105,6 +107,7 @@ public abstract class PersistentManagerB
this.session = session;
}
+ @Override
public Void run() throws Exception{
store.save(session);
return null;
@@ -118,6 +121,7 @@ public abstract class PersistentManagerB
// NOOP
}
+ @Override
public String[] run() throws Exception{
return store.keys();
}
@@ -528,6 +532,7 @@ public abstract class PersistentManagerB
* class. In order to use it, a subclass must specifically call it,
* for example in the start() and/or processPersistenceChecks() methods.
*/
+ @Override
public void load() {
// Initialize our internal data structures
@@ -625,6 +630,7 @@ public abstract class PersistentManagerB
* class. In order to use it, a subclass must specifically call it,
* for example in the stop() and/or processPersistenceChecks() methods.
*/
+ @Override
public void unload() {
if (store == null)
@@ -809,7 +815,7 @@ public abstract class PersistentManagerB
/**
* Start this component and implement the requirements
- * of {...@link LifecycleBase#startInternal()}.
+ * of {...@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
@@ -835,7 +841,7 @@ public abstract class PersistentManagerB
/**
* Stop this component and implement the requirements
- * of {...@link LifecycleBase#stopInternal()}.
+ * of {...@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
Modified: tomcat/trunk/java/org/apache/catalina/session/StandardManager.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardManager.java?rev=1026782&r1=1026781&r2=1026782&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/StandardManager.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/session/StandardManager.java Sun Oct
24 13:01:28 2010
@@ -42,7 +42,6 @@ import org.apache.catalina.Loader;
import org.apache.catalina.Session;
import org.apache.catalina.security.SecurityUtil;
import org.apache.catalina.util.CustomObjectInputStream;
-import org.apache.catalina.util.LifecycleBase;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.ExceptionUtils;
@@ -73,6 +72,7 @@ public class StandardManager extends Man
// NOOP
}
+ @Override
public Void run() throws Exception{
doLoad();
return null;
@@ -86,6 +86,7 @@ public class StandardManager extends Man
// NOOP
}
+ @Override
public Void run() throws Exception{
doUnload();
return null;
@@ -183,6 +184,7 @@ public class StandardManager extends Man
* found during the reload
* @exception IOException if an input/output error occurs
*/
+ @Override
public void load() throws ClassNotFoundException, IOException {
if (SecurityUtil.isPackageProtectionEnabled()){
try{
@@ -333,6 +335,7 @@ public class StandardManager extends Man
*
* @exception IOException if an input/output error occurs
*/
+ @Override
public void unload() throws IOException {
if (SecurityUtil.isPackageProtectionEnabled()){
try{
@@ -447,7 +450,7 @@ public class StandardManager extends Man
/**
* Start this component and implement the requirements
- * of {...@link LifecycleBase#startInternal()}.
+ * of {...@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
@@ -476,7 +479,7 @@ public class StandardManager extends Man
/**
* Stop this component and implement the requirements
- * of {...@link LifecycleBase#stopInternal()}.
+ * of {...@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
Modified: tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardSession.java?rev=1026782&r1=1026781&r2=1026782&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/session/StandardSession.java Sun Oct
24 13:01:28 2010
@@ -272,6 +272,7 @@ public class StandardSession
/**
* The HTTP session context associated with this session.
*/
+ @Deprecated
protected static volatile HttpSessionContext sessionContext = null;
@@ -302,6 +303,7 @@ public class StandardSession
* Return the authentication type used to authenticate our cached
* Principal, if any.
*/
+ @Override
public String getAuthType() {
return (this.authType);
@@ -315,6 +317,7 @@ public class StandardSession
*
* @param authType The new cached authentication type
*/
+ @Override
public void setAuthType(String authType) {
String oldAuthType = this.authType;
@@ -330,6 +333,7 @@ public class StandardSession
*
* @param time The new creation time
*/
+ @Override
public void setCreationTime(long time) {
this.creationTime = time;
@@ -342,6 +346,7 @@ public class StandardSession
/**
* Return the session identifier for this session.
*/
+ @Override
public String getId() {
return (this.id);
@@ -352,6 +357,7 @@ public class StandardSession
/**
* Return the session identifier for this session.
*/
+ @Override
public String getIdInternal() {
return (this.id);
@@ -364,6 +370,7 @@ public class StandardSession
*
* @param id The new session identifier
*/
+ @Override
public void setId(String id) {
if ((this.id != null) && (manager != null))
@@ -428,6 +435,7 @@ public class StandardSession
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
@@ -442,6 +450,7 @@ public class StandardSession
* a value associated with the session, do not affect the access time.
* This one gets updated whenever a request starts.
*/
+ @Override
public long getThisAccessedTime() {
if (!isValidInternal()) {
@@ -456,6 +465,7 @@ public class StandardSession
* Return the last client access time without invalidation check
* @see #getThisAccessedTime()
*/
+ @Override
public long getThisAccessedTimeInternal() {
return (this.thisAccessedTime);
}
@@ -467,6 +477,7 @@ public class StandardSession
* a value associated with the session, do not affect the access time.
* This one gets updated whenever a request finishes.
*/
+ @Override
public long getLastAccessedTime() {
if (!isValidInternal()) {
@@ -481,6 +492,7 @@ public class StandardSession
* Return the last client access time without invalidation check
* @see #getLastAccessedTime()
*/
+ @Override
public long getLastAccessedTimeInternal() {
return (this.lastAccessedTime);
}
@@ -488,6 +500,7 @@ public class StandardSession
/**
* Return the Manager within which this Session is valid.
*/
+ @Override
public Manager getManager() {
return (this.manager);
@@ -500,6 +513,7 @@ public class StandardSession
*
* @param manager The new Manager
*/
+ @Override
public void setManager(Manager manager) {
this.manager = manager;
@@ -512,6 +526,7 @@ public class StandardSession
* before the servlet container will invalidate the session. A negative
* time indicates that the session should never time out.
*/
+ @Override
public int getMaxInactiveInterval() {
return (this.maxInactiveInterval);
@@ -526,6 +541,7 @@ public class StandardSession
*
* @param interval The new maximum interval
*/
+ @Override
public void setMaxInactiveInterval(int interval) {
this.maxInactiveInterval = interval;
@@ -541,6 +557,7 @@ public class StandardSession
*
* @param isNew The new value for the <code>isNew</code> flag
*/
+ @Override
public void setNew(boolean isNew) {
this.isNew = isNew;
@@ -555,6 +572,7 @@ public class StandardSession
* <code>Realm.authenticate()</code> calls on every request. If there
* is no current associated Principal, return <code>null</code>.
*/
+ @Override
public Principal getPrincipal() {
return (this.principal);
@@ -570,6 +588,7 @@ public class StandardSession
*
* @param principal The new Principal, or <code>null</code> if none
*/
+ @Override
public void setPrincipal(Principal principal) {
Principal oldPrincipal = this.principal;
@@ -583,6 +602,7 @@ public class StandardSession
* Return the <code>HttpSession</code> for which this object
* is the facade.
*/
+ @Override
public HttpSession getSession() {
if (facade == null){
@@ -590,6 +610,7 @@ public class StandardSession
final StandardSession fsession = this;
facade = AccessController.doPrivileged(
new PrivilegedAction<StandardSessionFacade>(){
+ @Override
public StandardSessionFacade run(){
return new StandardSessionFacade(fsession);
}
@@ -606,6 +627,7 @@ public class StandardSession
/**
* Return the <code>isValid</code> flag for this session.
*/
+ @Override
public boolean isValid() {
if (this.expiring) {
@@ -642,6 +664,7 @@ public class StandardSession
*
* @param isValid The new value for the <code>isValid</code> flag
*/
+ @Override
public void setValid(boolean isValid) {
this.isValid = isValid;
}
@@ -655,6 +678,7 @@ public class StandardSession
* should be called by the context when a request comes in for a particular
* session, even if the application does not reference it.
*/
+ @Override
public void access() {
this.thisAccessedTime = System.currentTimeMillis();
@@ -669,6 +693,7 @@ public class StandardSession
/**
* End the access.
*/
+ @Override
public void endAccess() {
isNew = false;
@@ -695,6 +720,7 @@ public class StandardSession
/**
* Add a session event listener to this component.
*/
+ @Override
public void addSessionListener(SessionListener listener) {
listeners.add(listener);
@@ -706,6 +732,7 @@ public class StandardSession
* Perform the internal processing required to invalidate this session,
* without triggering an exception if the session has already expired.
*/
+ @Override
public void expire() {
expire(true);
@@ -932,6 +959,7 @@ public class StandardSession
*
* @param name Name of the note to be returned
*/
+ @Override
public Object getNote(String name) {
return (notes.get(name));
@@ -943,6 +971,7 @@ public class StandardSession
* Return an Iterator containing the String names of all notes bindings
* that exist for this session.
*/
+ @Override
public Iterator<String> getNoteNames() {
return (notes.keySet().iterator());
@@ -954,6 +983,7 @@ public class StandardSession
* Release all object references, and initialize instance variables, in
* preparation for reuse of this object.
*/
+ @Override
public void recycle() {
// Reset the instance variables associated with this Session
@@ -979,6 +1009,7 @@ public class StandardSession
*
* @param name Name of the note to be removed
*/
+ @Override
public void removeNote(String name) {
notes.remove(name);
@@ -989,6 +1020,7 @@ public class StandardSession
/**
* Remove a session event listener from this component.
*/
+ @Override
public void removeSessionListener(SessionListener listener) {
listeners.remove(listener);
@@ -1003,6 +1035,7 @@ public class StandardSession
* @param name Name to which the object should be bound
* @param value Object to be bound to the specified name
*/
+ @Override
public void setNote(String name, Object value) {
notes.put(name, value);
@@ -1073,6 +1106,7 @@ public class StandardSession
* @exception IllegalStateException if this method is called on an
* invalidated session
*/
+ @Override
public long getCreationTime() {
if (!isValidInternal())
@@ -1087,6 +1121,7 @@ public class StandardSession
/**
* Return the ServletContext to which this session belongs.
*/
+ @Override
public ServletContext getServletContext() {
if (manager == null)
@@ -1107,6 +1142,7 @@ public class StandardSession
* replacement. It will be removed in a future version of the
* Java Servlet API.
*/
+ @Override
@Deprecated
public HttpSessionContext getSessionContext() {
@@ -1129,6 +1165,7 @@ public class StandardSession
* @exception IllegalStateException if this method is called on an
* invalidated session
*/
+ @Override
public Object getAttribute(String name) {
if (!isValidInternal())
@@ -1149,6 +1186,7 @@ public class StandardSession
* @exception IllegalStateException if this method is called on an
* invalidated session
*/
+ @Override
public Enumeration<String> getAttributeNames() {
if (!isValidInternal())
@@ -1172,6 +1210,7 @@ public class StandardSession
* @deprecated As of Version 2.2, this method is replaced by
* <code>getAttribute()</code>
*/
+ @Override
@Deprecated
public Object getValue(String name) {
@@ -1190,6 +1229,7 @@ public class StandardSession
* @deprecated As of Version 2.2, this method is replaced by
* <code>getAttributeNames()</code>
*/
+ @Override
@Deprecated
public String[] getValueNames() {
@@ -1208,6 +1248,7 @@ public class StandardSession
* @exception IllegalStateException if this method is called on
* an invalidated session
*/
+ @Override
public void invalidate() {
if (!isValidInternal())
@@ -1230,6 +1271,7 @@ public class StandardSession
* @exception IllegalStateException if this method is called on an
* invalidated session
*/
+ @Override
public boolean isNew() {
if (!isValidInternal())
@@ -1259,6 +1301,7 @@ public class StandardSession
* @deprecated As of Version 2.2, this method is replaced by
* <code>setAttribute()</code>
*/
+ @Override
@Deprecated
public void putValue(String name, Object value) {
@@ -1281,6 +1324,7 @@ public class StandardSession
* @exception IllegalStateException if this method is called on an
* invalidated session
*/
+ @Override
public void removeAttribute(String name) {
removeAttribute(name, true);
@@ -1333,6 +1377,7 @@ public class StandardSession
* @deprecated As of Version 2.2, this method is replaced by
* <code>removeAttribute()</code>
*/
+ @Override
@Deprecated
public void removeValue(String name) {
@@ -1358,6 +1403,7 @@ public class StandardSession
* @exception IllegalStateException if this method is called on an
* invalidated session
*/
+ @Override
public void setAttribute(String name, Object value) {
setAttribute(name,value,true);
}
@@ -1796,6 +1842,7 @@ public class StandardSession
this.cl = cl;
}
+ @Override
public Void run() {
Thread.currentThread().setContextClassLoader(cl);
return null;
@@ -1833,6 +1880,7 @@ final class StandardSessionContext imple
* This method must return an empty <code>Enumeration</code>
* and will be removed in a future version of the API.
*/
+ @Override
@Deprecated
public Enumeration<String> getIds() {
@@ -1851,6 +1899,7 @@ final class StandardSessionContext imple
* This method must return null and will be removed in a
* future version of the API.
*/
+ @Override
@Deprecated
public HttpSession getSession(String id) {
Modified:
tomcat/trunk/java/org/apache/catalina/session/StandardSessionFacade.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardSessionFacade.java?rev=1026782&r1=1026781&r2=1026782&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/StandardSessionFacade.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/session/StandardSessionFacade.java
Sun Oct 24 13:01:28 2010
@@ -70,32 +70,38 @@ public class StandardSessionFacade
// ---------------------------------------------------- HttpSession Methods
+ @Override
public long getCreationTime() {
return session.getCreationTime();
}
+ @Override
public String getId() {
return session.getId();
}
+ @Override
public long getLastAccessedTime() {
return session.getLastAccessedTime();
}
+ @Override
public ServletContext getServletContext() {
// FIXME : Facade this object ?
return session.getServletContext();
}
+ @Override
public void setMaxInactiveInterval(int interval) {
session.setMaxInactiveInterval(interval);
}
+ @Override
public int getMaxInactiveInterval() {
return session.getMaxInactiveInterval();
}
@@ -104,12 +110,14 @@ public class StandardSessionFacade
/**
* @deprecated
*/
+ @Override
@Deprecated
public HttpSessionContext getSessionContext() {
return session.getSessionContext();
}
+ @Override
public Object getAttribute(String name) {
return session.getAttribute(name);
}
@@ -118,12 +126,14 @@ public class StandardSessionFacade
/**
* @deprecated
*/
+ @Override
@Deprecated
public Object getValue(String name) {
return session.getAttribute(name);
}
+ @Override
public Enumeration<String> getAttributeNames() {
return session.getAttributeNames();
}
@@ -132,12 +142,14 @@ public class StandardSessionFacade
/**
* @deprecated
*/
+ @Override
@Deprecated
public String[] getValueNames() {
return session.getValueNames();
}
+ @Override
public void setAttribute(String name, Object value) {
session.setAttribute(name, value);
}
@@ -146,12 +158,14 @@ public class StandardSessionFacade
/**
* @deprecated
*/
+ @Override
@Deprecated
public void putValue(String name, Object value) {
session.setAttribute(name, value);
}
+ @Override
public void removeAttribute(String name) {
session.removeAttribute(name);
}
@@ -160,17 +174,20 @@ public class StandardSessionFacade
/**
* @deprecated
*/
+ @Override
@Deprecated
public void removeValue(String name) {
session.removeAttribute(name);
}
+ @Override
public void invalidate() {
session.invalidate();
}
+ @Override
public boolean isNew() {
return session.isNew();
}
Modified: tomcat/trunk/java/org/apache/catalina/session/StoreBase.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StoreBase.java?rev=1026782&r1=1026781&r2=1026782&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/StoreBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/StoreBase.java Sun Oct 24
13:01:28 2010
@@ -70,6 +70,7 @@ public abstract class StoreBase extends
/**
* Return the info for this Store.
*/
+ @Override
public String getInfo() {
return(info);
}
@@ -88,6 +89,7 @@ public abstract class StoreBase extends
*
* @param manager The newly associated Manager
*/
+ @Override
public void setManager(Manager manager) {
Manager oldManager = this.manager;
this.manager = manager;
@@ -97,6 +99,7 @@ public abstract class StoreBase extends
/**
* Return the Manager with which the Store is associated.
*/
+ @Override
public Manager getManager() {
return(this.manager);
}
@@ -109,6 +112,7 @@ public abstract class StoreBase extends
*
* @param listener a value of type 'PropertyChangeListener'
*/
+ @Override
public void addPropertyChangeListener(PropertyChangeListener listener) {
support.addPropertyChangeListener(listener);
}
@@ -118,6 +122,7 @@ public abstract class StoreBase extends
*
* @param listener The listener to remove
*/
+ @Override
public void removePropertyChangeListener(PropertyChangeListener listener) {
support.removePropertyChangeListener(listener);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]