diff src/org/eclipse/jetty/server/Request.java @ 994:4e9d373bf6e9

remove ContextHandler.Context
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 18 Oct 2016 16:34:18 -0600
parents 688c39c50ee3
children 7d28be82ab75
line wrap: on
line diff
--- a/src/org/eclipse/jetty/server/Request.java	Tue Oct 18 15:54:54 2016 -0600
+++ b/src/org/eclipse/jetty/server/Request.java	Tue Oct 18 16:34:18 2016 -0600
@@ -79,7 +79,6 @@
 import org.eclipse.jetty.io.nio.IndirectNIOBuffer;
 import org.eclipse.jetty.io.nio.NIOBuffer;
 import org.eclipse.jetty.server.handler.ContextHandler;
-import org.eclipse.jetty.server.handler.ContextHandler.Context;
 import org.eclipse.jetty.util.Attributes;
 import org.eclipse.jetty.util.AttributesMap;
 import org.eclipse.jetty.util.IO;
@@ -136,7 +135,7 @@
 	private MultiMap<String> _baseParameters;
 	private String _characterEncoding;
 	protected AbstractHttpConnection _connection;
-	private ContextHandler.Context _context;
+	public ContextHandler _contextHandler = null;
 	private String _contextPath;
 	private CookieCutter _cookies;
 	private boolean _cookiesExtracted = false;
@@ -391,15 +390,6 @@
 	}
 
 	/* ------------------------------------------------------------ */
-	/**
-	 * @return The current {@link Context context} used for this request, or <code>null</code> if {@link #setContext} has not yet been called.
-	 */
-	public Context getContext()
-	{
-		return _context;
-	}
-
-	/* ------------------------------------------------------------ */
 	/*
 	 * @see javax.servlet.http.HttpServletRequest#getContextPath()
 	 */
@@ -1204,7 +1194,7 @@
 		}
 
 		_handled = false;
-		if (_context != null)
+		if (_contextHandler != null)
 			throw new IllegalStateException("Request in context!");
 		if (_attributes != null)
 			_attributes.clearAttributes();
@@ -1213,7 +1203,6 @@
 		if (_cookies != null)
 			_cookies.reset();
 		_cookiesExtracted = false;
-		_context = null;
 		_serverName = null;
 		_method = null;
 		_pathInfo = null;
@@ -1305,18 +1294,6 @@
 
 	/* ------------------------------------------------------------ */
 	/**
-	 * Set request context
-	 *
-	 * @param context
-	 *            context object
-	 */
-	public void setContext(Context context)
-	{
-		_context = context;
-	}
-
-	/* ------------------------------------------------------------ */
-	/**
 	 * Sets the "context path" for this request
 	 *
 	 * @see HttpServletRequest#getContextPath()