diff src/org/eclipse/jetty/server/handler/ResourceHandler.java @ 992:0608a6664bee

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 18 Oct 2016 15:23:25 -0600
parents 688c39c50ee3
children 4e9d373bf6e9
line wrap: on
line diff
--- 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);
 	}