changeset 987:af8742d31bca

remove Server._attributes
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 17 Oct 2016 04:59:15 -0600
parents 4f2d04c72781
children 13beba0c127f
files src/org/eclipse/jetty/server/Request.java src/org/eclipse/jetty/server/Server.java
diffstat 2 files changed, 3 insertions(+), 74 deletions(-) [+]
line wrap: on
line diff
--- a/src/org/eclipse/jetty/server/Request.java	Mon Oct 17 04:44:53 2016 -0600
+++ b/src/org/eclipse/jetty/server/Request.java	Mon Oct 17 04:59:15 2016 -0600
@@ -255,34 +255,12 @@
 							
 							if (maxFormContentSize < 0)
 							{
-								Object obj = _connection.getConnector().server.getAttribute("org.eclipse.jetty.server.Request.maxFormContentSize");
-								if (obj == null)
-									maxFormContentSize = 200000;
-								else if (obj instanceof Number)
-								{                      
-									Number size = (Number)obj;
-									maxFormContentSize = size.intValue();
-								}
-								else if (obj instanceof String)
-								{
-									maxFormContentSize = Integer.valueOf((String)obj);
-								}
+								maxFormContentSize = 200000;
 							}
 							
 							if (maxFormKeys < 0)
 							{
-								Object obj = _connection.getConnector().server.getAttribute("org.eclipse.jetty.server.Request.maxFormKeys");
-								if (obj == null)
-									maxFormKeys = 1000;
-								else if (obj instanceof Number)
-								{
-									Number keys = (Number)obj;
-									maxFormKeys = keys.intValue();
-								}
-								else if (obj instanceof String)
-								{
-									maxFormKeys = Integer.valueOf((String)obj);
-								}
+								maxFormKeys = 1000;
 							}
 
 							if (content_length > maxFormContentSize && maxFormContentSize > 0)
--- a/src/org/eclipse/jetty/server/Server.java	Mon Oct 17 04:44:53 2016 -0600
+++ b/src/org/eclipse/jetty/server/Server.java	Mon Oct 17 04:59:15 2016 -0600
@@ -36,8 +36,6 @@
 import org.eclipse.jetty.server.handler.HandlerWrapper;
 import org.eclipse.jetty.server.nio.BlockingChannelConnector;
 import org.eclipse.jetty.server.nio.SelectChannelConnector;
-import org.eclipse.jetty.util.Attributes;
-import org.eclipse.jetty.util.AttributesMap;
 import org.eclipse.jetty.util.LazyList;
 import org.eclipse.jetty.util.MultiException;
 import org.eclipse.jetty.util.TypeUtil;
@@ -56,13 +54,12 @@
  *
  *  @org.apache.xbean.XBean  description="Creates an embedded Jetty web server"
  */
-public class Server extends HandlerWrapper implements Attributes
+public final class Server extends HandlerWrapper
 {
 	private static final Logger LOG = LoggerFactory.getLogger(Server.class);
 
 	public static final String version = "8";
 
-	private final AttributesMap _attributes = new AttributesMap();
 	public final ThreadPoolExecutor threadPool = new ThreadPoolExecutor(256, 256, 60, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
 	final List<Connector> connectors = new ArrayList<Connector>();
 
@@ -164,52 +161,6 @@
 		threadPool.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS);
 	}
 
-	/* ------------------------------------------------------------ */
-	/*
-	 * @see org.eclipse.util.AttributesMap#clearAttributes()
-	 */
-	public void clearAttributes()
-	{
-		_attributes.clearAttributes();
-	}
-
-	/* ------------------------------------------------------------ */
-	/*
-	 * @see org.eclipse.util.AttributesMap#getAttribute(java.lang.String)
-	 */
-	public Object getAttribute(String name)
-	{
-		return _attributes.getAttribute(name);
-	}
-
-	/* ------------------------------------------------------------ */
-	/*
-	 * @see org.eclipse.util.AttributesMap#getAttributeNames()
-	 */
-	public Enumeration getAttributeNames()
-	{
-		return AttributesMap.getAttributeNamesCopy(_attributes);
-	}
-
-	/* ------------------------------------------------------------ */
-	/*
-	 * @see org.eclipse.util.AttributesMap#removeAttribute(java.lang.String)
-	 */
-	public void removeAttribute(String name)
-	{
-		_attributes.removeAttribute(name);
-	}
-
-	/* ------------------------------------------------------------ */
-	/*
-	 * @see org.eclipse.util.AttributesMap#setAttribute(java.lang.String, java.lang.Object)
-	 */
-	public void setAttribute(String name, Object attribute)
-	{
-		_attributes.setAttribute(name, attribute);
-	}
-
-	/* ------------------------------------------------------------ */
 	@Override
 	public String toString()
 	{