Author: markt Date: Mon Aug 23 17:38:41 2010 New Revision: 988225 URL: http://svn.apache.org/viewvc?rev=988225&view=rev Log: Fix the Eclipse warnings in o.a.c.loader
Modified: tomcat/trunk/java/org/apache/catalina/loader/StandardClassLoaderMBean.java tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java Modified: tomcat/trunk/java/org/apache/catalina/loader/StandardClassLoaderMBean.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/StandardClassLoaderMBean.java?rev=988225&r1=988224&r2=988225&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/loader/StandardClassLoaderMBean.java (original) +++ tomcat/trunk/java/org/apache/catalina/loader/StandardClassLoaderMBean.java Mon Aug 23 17:38:41 2010 @@ -25,5 +25,6 @@ package org.apache.catalina.loader; * @version $Id$ */ public interface StandardClassLoaderMBean { + // Marker interface } Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=988225&r1=988224&r2=988225&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java (original) +++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Mon Aug 23 17:38:41 2010 @@ -148,6 +148,7 @@ public class WebappClassLoader this.path = path; } + @Override public ResourceEntry run() { return findResourceInternal(name, path); } @@ -164,6 +165,7 @@ public class WebappClassLoader this.clazz = clazz; } + @Override public ClassLoader run() { return clazz.getClassLoader(); } @@ -574,16 +576,18 @@ public class WebappClassLoader * If there is a Java SecurityManager create a read FilePermission * or JndiPermission for the file directory path. * - * @param path file directory path + * @param filepath file directory path */ - public void addPermission(String path) { - if (path == null) { + public void addPermission(String filepath) { + if (filepath == null) { return; } + String path = filepath; + if (securityManager != null) { Permission permission = null; - if( path.startsWith("jndi:") || path.startsWith("jar:jndi:") ) { + if (path.startsWith("jndi:") || path.startsWith("jar:jndi:")) { if (!path.endsWith("/")) { path = path + "/"; } @@ -1287,6 +1291,7 @@ public class WebappClassLoader // Ignore } } catch (NamingException e) { + // Ignore } } @@ -1762,7 +1767,9 @@ public class WebappClassLoader * * @param listener The listener to add */ + @Override public void addLifecycleListener(LifecycleListener listener) { + // NOOP } @@ -1770,6 +1777,7 @@ public class WebappClassLoader * Get the lifecycle listeners associated with this lifecycle. If this * Lifecycle has no listeners registered, a zero-length array is returned. */ + @Override public LifecycleListener[] findLifecycleListeners() { return new LifecycleListener[0]; } @@ -1780,7 +1788,9 @@ public class WebappClassLoader * * @param listener The listener to remove */ + @Override public void removeLifecycleListener(LifecycleListener listener) { + // NOOP } @@ -1789,6 +1799,7 @@ public class WebappClassLoader * * @return The current state of the source component. */ + @Override public LifecycleState getState() { return LifecycleState.NEW; } @@ -1805,6 +1816,7 @@ public class WebappClassLoader * * @exception LifecycleException if a lifecycle error occurs */ + @Override public void start() throws LifecycleException { started = true; @@ -1830,6 +1842,7 @@ public class WebappClassLoader * * @exception LifecycleException if a lifecycle error occurs */ + @Override public void stop() throws LifecycleException { // Clearing references should be done before setting started to @@ -2904,6 +2917,7 @@ public class WebappClassLoader } } catch (NamingException e) { + // Ignore } } @@ -2992,12 +3006,14 @@ public class WebappClassLoader is.close(); } } catch (IOException e) { + // Ignore } try { if (os != null) { os.close(); } } catch (IOException e) { + // Ignore } } } @@ -3273,10 +3289,9 @@ public class WebappClassLoader } if(encoded) { return getURI(realFile); - } else { - return realFile.toURI().toURL(); } - + + return realFile.toURI().toURL(); } Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java?rev=988225&r1=988224&r2=988225&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java (original) +++ tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java Mon Aug 23 17:38:41 2010 @@ -208,6 +208,7 @@ public class WebappLoader extends Lifecy /** * Return the Java class loader to be used by this Container. */ + @Override public ClassLoader getClassLoader() { return classLoader; @@ -218,6 +219,7 @@ public class WebappLoader extends Lifecy /** * Return the Container with which this Logger has been associated. */ + @Override public Container getContainer() { return (container); @@ -230,6 +232,7 @@ public class WebappLoader extends Lifecy * * @param container The associated Container */ + @Override public void setContainer(Container container) { // Deregister from the old Container (if any) @@ -254,6 +257,7 @@ public class WebappLoader extends Lifecy * Return the "follow standard delegation model" flag used to configure * our ClassLoader. */ + @Override public boolean getDelegate() { return (this.delegate); @@ -267,6 +271,7 @@ public class WebappLoader extends Lifecy * * @param delegate The new flag */ + @Override public void setDelegate(boolean delegate) { boolean oldDelegate = this.delegate; @@ -282,6 +287,7 @@ public class WebappLoader extends Lifecy * the corresponding version number, in the format * <code><description>/<version></code>. */ + @Override public String getInfo() { return (info); @@ -314,6 +320,7 @@ public class WebappLoader extends Lifecy /** * Return the reloadable flag for this Loader. */ + @Override public boolean getReloadable() { return (this.reloadable); @@ -326,6 +333,7 @@ public class WebappLoader extends Lifecy * * @param reloadable The new reloadable flag */ + @Override public void setReloadable(boolean reloadable) { // Process this property change @@ -363,6 +371,7 @@ public class WebappLoader extends Lifecy * * @param listener The listener to add */ + @Override public void addPropertyChangeListener(PropertyChangeListener listener) { support.addPropertyChangeListener(listener); @@ -375,6 +384,7 @@ public class WebappLoader extends Lifecy * * @param repository Repository to be added */ + @Override public void addRepository(String repository) { if (log.isDebugEnabled()) @@ -404,6 +414,7 @@ public class WebappLoader extends Lifecy * invoked inside the classloading context of this container. Unexpected * throwables will be caught and logged. */ + @Override public void backgroundProcess() { if (reloadable && modified()) { try { @@ -430,6 +441,7 @@ public class WebappLoader extends Lifecy * For security reason, returns a clone of the Array (since * String are immutable). */ + @Override public String[] findRepositories() { return repositories.clone(); @@ -482,6 +494,7 @@ public class WebappLoader extends Lifecy * Has the internal repository associated with this Loader been modified, * such that the loaded classes should be reloaded? */ + @Override public boolean modified() { return classLoader != null ? classLoader.modified() : false ; } @@ -502,6 +515,7 @@ public class WebappLoader extends Lifecy * * @param listener The listener to remove */ + @Override public void removePropertyChangeListener(PropertyChangeListener listener) { support.removePropertyChangeListener(listener); @@ -668,6 +682,7 @@ public class WebappLoader extends Lifecy * * @param event The property change event that has occurred */ + @Override public void propertyChange(PropertyChangeEvent event) { // Validate the source of this event --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org