changeset 992:0608a6664bee

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 18 Oct 2016 15:23:25 -0600
parents 688c39c50ee3
children d9d95acded81
files src/org/eclipse/jetty/server/handler/ContextHandler.java src/org/eclipse/jetty/server/handler/ResourceHandler.java
diffstat 2 files changed, 7 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
diff -r 688c39c50ee3 -r 0608a6664bee src/org/eclipse/jetty/server/handler/ContextHandler.java
--- a/src/org/eclipse/jetty/server/handler/ContextHandler.java	Tue Oct 18 00:22:46 2016 -0600
+++ b/src/org/eclipse/jetty/server/handler/ContextHandler.java	Tue Oct 18 15:23:25 2016 -0600
@@ -215,8 +215,7 @@
 			old_context = __context.get();
 			__context.set(_scontext);
 
-			// defers the calling of super.doStart()
-			startContext();
+			super.doStart();
 
 			synchronized(this)
 			{
@@ -230,18 +229,6 @@
 	}
 
 	/* ------------------------------------------------------------ */
-	/**
-	 * Extensible startContext. this method is called from {@link ContextHandler#doStart()} instead of a call to super.doStart(). This allows derived classes to
-	 * insert additional handling (Eg configuration) before the call to super.doStart by this method will start contained handlers.
-	 *
-	 * @see org.eclipse.jetty.server.handler.ContextHandler.Context
-	 */
-	protected void startContext() throws Exception
-	{
-		super.doStart();
-	}
-
-	/* ------------------------------------------------------------ */
 	public void callContextInitialized (ServletContextListener l, ServletContextEvent e)
 	{
 		l.contextInitialized(e);
diff -r 688c39c50ee3 -r 0608a6664bee src/org/eclipse/jetty/server/handler/ResourceHandler.java
--- a/src/org/eclipse/jetty/server/handler/ResourceHandler.java	Tue Oct 18 00:22:46 2016 -0600
+++ b/src/org/eclipse/jetty/server/handler/ResourceHandler.java	Tue Oct 18 15:23:25 2016 -0600
@@ -55,7 +55,7 @@
  *
  * @org.apache.xbean.XBean
  */
-public class ResourceHandler extends HandlerWrapper
+public final class ResourceHandler extends HandlerWrapper
 {
 	private static final Logger LOG = LoggerFactory.getLogger(ResourceHandler.class);
 
@@ -259,10 +259,7 @@
 		_cacheControl=cacheControl==null?null:new ByteArrayBuffer(cacheControl);
 	}
 
-	/* ------------------------------------------------------------ */
-	/*
-	 */
-	public Resource getResource(String path) throws MalformedURLException
+	private Resource getResource(String path) throws MalformedURLException
 	{
 		if (path==null || !path.startsWith("/"))
 			throw new MalformedURLException(path);
@@ -272,14 +269,14 @@
 		{
 			if (_context==null)
 				return null;
-			base=_context.getBaseResource();
+			base = _context.getBaseResource();
 			if (base==null)
 				return null;
 		}
 
 		try
 		{
-			path=URIUtil.canonicalPath(path);
+			path = URIUtil.canonicalPath(path);
 			return base.addPath(path);
 		}
 		catch(Exception e)
@@ -290,8 +287,7 @@
 		return null;
 	}
 
-	/* ------------------------------------------------------------ */
-	protected Resource getResource(HttpServletRequest request) throws MalformedURLException
+	private Resource getResource(HttpServletRequest request) throws MalformedURLException
 	{
 		String servletPath;
 		String pathInfo;
@@ -313,7 +309,7 @@
 			pathInfo = request.getPathInfo();
 		}
 		
-		String pathInContext=URIUtil.addPaths(servletPath,pathInfo);
+		String pathInContext = URIUtil.addPaths(servletPath,pathInfo);
 		return getResource(pathInContext);
 	}