Author: markt Date: Thu Dec 29 19:45:32 2011 New Revision: 1225628 URL: http://svn.apache.org/viewvc?rev=1225628&view=rev Log: Remove unused code
Modified: tomcat/trunk/java/org/apache/naming/ContextBindings.java tomcat/trunk/java/org/apache/naming/resources/ProxyDirContext.java tomcat/trunk/java/org/apache/naming/resources/ResourceAttributes.java tomcat/trunk/java/org/apache/naming/resources/ResourceCache.java Modified: tomcat/trunk/java/org/apache/naming/ContextBindings.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/ContextBindings.java?rev=1225628&r1=1225627&r2=1225628&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/naming/ContextBindings.java (original) +++ tomcat/trunk/java/org/apache/naming/ContextBindings.java Thu Dec 29 19:45:32 2011 @@ -114,19 +114,6 @@ public class ContextBindings { * Unbind context name. * * @param name Name of the context - * - * @deprecated - unused - */ - @Deprecated - public static void unbindContext(Object name) { - unbindContext(name, null); - } - - - /** - * Unbind context name. - * - * @param name Name of the context * @param token Security token */ public static void unbindContext(Object name, Object token) { @@ -149,20 +136,6 @@ public class ContextBindings { * Binds a naming context to a thread. * * @param name Name of the context - * - * @deprecated - unused - */ - @Deprecated - public static void bindThread(Object name) - throws NamingException { - bindThread(name, null); - } - - - /** - * Binds a naming context to a thread. - * - * @param name Name of the context * @param token Security token */ public static void bindThread(Object name, Object token) @@ -182,19 +155,6 @@ public class ContextBindings { * Unbinds a naming context to a thread. * * @param name Name of the context - * - * @deprecated - unused - */ - @Deprecated - public static void unbindThread(Object name) { - unbindThread(name, null); - } - - - /** - * Unbinds a naming context to a thread. - * - * @param name Name of the context * @param token Security token */ public static void unbindThread(Object name, Object token) { @@ -240,36 +200,6 @@ public class ContextBindings { /** - * Binds a naming context to a class loader. - * - * @param name Name of the context - * - * @deprecated - unused - */ - @Deprecated - public static void bindClassLoader(Object name) - throws NamingException { - bindClassLoader(name, null); - } - - - /** - * Binds a naming context to a thread. - * - * @param name Name of the context - * @param token Security token - * - * @deprecated - unused - */ - @Deprecated - public static void bindClassLoader(Object name, Object token) - throws NamingException { - bindClassLoader - (name, token, Thread.currentThread().getContextClassLoader()); - } - - - /** * Binds a naming context to a thread. * * @param name Name of the context @@ -293,34 +223,6 @@ public class ContextBindings { * Unbinds a naming context to a class loader. * * @param name Name of the context - * - * @deprecated - unused - */ - @Deprecated - public static void unbindClassLoader(Object name) { - unbindClassLoader(name, null); - } - - - /** - * Unbinds a naming context to a class loader. - * - * @param name Name of the context - * @param token Security token - * - * @deprecated - unused - */ - @Deprecated - public static void unbindClassLoader(Object name, Object token) { - unbindClassLoader(name, token, - Thread.currentThread().getContextClassLoader()); - } - - - /** - * Unbinds a naming context to a class loader. - * - * @param name Name of the context * @param token Security token */ public static void unbindClassLoader(Object name, Object token, Modified: tomcat/trunk/java/org/apache/naming/resources/ProxyDirContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/ProxyDirContext.java?rev=1225628&r1=1225627&r2=1225628&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/naming/resources/ProxyDirContext.java (original) +++ tomcat/trunk/java/org/apache/naming/resources/ProxyDirContext.java Thu Dec 29 19:45:32 2011 @@ -191,29 +191,6 @@ public class ProxyDirContext implements /** - * Return the actual directory context we are wrapping. - * @deprecated - unused - */ - @Deprecated - public DirContext getDirContext() { - return this.dirContext; - } - - - /** - * Return the document root for this component. - * @deprecated - unused - */ - @Deprecated - public String getDocBase() { - if (dirContext instanceof BaseDirContext) - return ((BaseDirContext) dirContext).getDocBase(); - else - return ""; - } - - - /** * Return the host name. */ public String getHostName() { Modified: tomcat/trunk/java/org/apache/naming/resources/ResourceAttributes.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/ResourceAttributes.java?rev=1225628&r1=1225627&r2=1225628&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/naming/resources/ResourceAttributes.java (original) +++ tomcat/trunk/java/org/apache/naming/resources/ResourceAttributes.java Thu Dec 29 19:45:32 2011 @@ -372,21 +372,6 @@ public class ResourceAttributes implemen /** - * Set creation. - * - * @param creation New creation value - * @deprecated - unused - */ - @Deprecated - public void setCreation(long creation) { - this.creation = creation; - this.creationDate = null; - if (attributes != null) - attributes.put(CREATION_DATE, new Date(creation)); - } - - - /** * Get creation date. * * @return Creation date value @@ -559,21 +544,6 @@ public class ResourceAttributes implemen /** - * Last modified date mutator. - * - * @param lastModifiedDate New last modified date - * @deprecated - unused - */ - @Deprecated - public void setLastModifiedDate(Date lastModifiedDate) { - this.lastModified = lastModifiedDate.getTime(); - this.lastModifiedDate = lastModifiedDate; - if (attributes != null) - attributes.put(LAST_MODIFIED, lastModifiedDate); - } - - - /** * @return Returns the lastModifiedHttp. */ public String getLastModifiedHttp() { @@ -594,16 +564,6 @@ public class ResourceAttributes implemen /** - * @param lastModifiedHttp The lastModifiedHttp to set. - * @deprecated - unused - */ - @Deprecated - public void setLastModifiedHttp(String lastModifiedHttp) { - this.lastModifiedHttp = lastModifiedHttp; - } - - - /** * @return Returns the mimeType. */ public String getMimeType() { @@ -730,6 +690,7 @@ public class ResourceAttributes implemen /** * Set strong ETag. + * TODO: This is never called. Should it be? */ public void setETag(String eTag) { this.strongETag = eTag; Modified: tomcat/trunk/java/org/apache/naming/resources/ResourceCache.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/ResourceCache.java?rev=1225628&r1=1225627&r2=1225628&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/naming/resources/ResourceCache.java (original) +++ tomcat/trunk/java/org/apache/naming/resources/ResourceCache.java Thu Dec 29 19:45:32 2011 @@ -70,20 +70,20 @@ public class ResourceCache { /** * Max amount of removals during a make space. */ - protected int maxAllocateIterations = 20; + protected final int maxAllocateIterations = 20; /** * Entry hit ratio at which an entry will never be removed from the cache. * Compared with entry.access / hitsCount */ - protected long desiredEntryAccessRatio = 3; + protected final long desiredEntryAccessRatio = 3; /** * Spare amount of not found entries. */ - protected int spareNotFoundEntries = 500; + protected final int spareNotFoundEntries = 500; /** @@ -145,26 +145,6 @@ public class ResourceCache { /** - * Return desired entry access ratio. - * @deprecated - unused - */ - @Deprecated - public long getDesiredEntryAccessRatio() { - return desiredEntryAccessRatio; - } - - - /** - * Set the desired entry access ratio. - * @deprecated - unused - */ - @Deprecated - public void setDesiredEntryAccessRatio(long desiredEntryAccessRatio) { - this.desiredEntryAccessRatio = desiredEntryAccessRatio; - } - - - /** * Return the number of cache hits. * Note: Update is not synced, so the number may not be completely * accurate. @@ -175,49 +155,8 @@ public class ResourceCache { } - /** - * Return the maximum amount of iterations during a space allocation. - * @deprecated - unused - */ - @Deprecated - public int getMaxAllocateIterations() { - return maxAllocateIterations; - } - - - /** - * Set the maximum amount of iterations during a space allocation. - * @deprecated - unused - */ - @Deprecated - public void setMaxAllocateIterations(int maxAllocateIterations) { - this.maxAllocateIterations = maxAllocateIterations; - } - - - /** - * Return the amount of spare not found entries. - * @deprecated - unused - */ - @Deprecated - public int getSpareNotFoundEntries() { - return spareNotFoundEntries; - } - - - /** - * Set the amount of spare not found entries. - * @deprecated - unused - */ - @Deprecated - public void setSpareNotFoundEntries(int spareNotFoundEntries) { - this.spareNotFoundEntries = spareNotFoundEntries; - } - - // --------------------------------------------------------- Public Methods - public boolean allocate(int space) { int toFree = space - (cacheMaxSize - cacheSize); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org