diff --git a/VERSION.txt b/VERSION.txt index 41b38c92997..64f1946f13e 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -5,6 +5,7 @@ jetty-7.2.0.RC1-SNAPSHOT + 326734 Configure Digest maxNonceAge with Security handler init param + 327109 Fixed AJP handling of empty packets + 327183 Allow better configurability of HttpClient for TLS/SSL + + 327469 removed needless java6 dependencies + JETTY-1288 Info statement when atypical classloader set on WebAppContext jetty-7.2.0.RC0 1 Oct 2010 diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java index 590179c5f3e..3e31a896b86 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java @@ -335,7 +335,7 @@ public class HttpDestination if (isProxied() && endPoint instanceof SelectConnector.ProxySelectChannelEndPoint) { SelectConnector.ProxySelectChannelEndPoint proxyEndPoint = (SelectConnector.ProxySelectChannelEndPoint)endPoint; - HttpExchange exchange = _queue.peekFirst(); + HttpExchange exchange = _queue.get(0); ConnectExchange connect = new ConnectExchange(getAddress(), proxyEndPoint, exchange); connect.setAddress(getProxy()); send(connection, connect); diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/nio/BlockingChannelConnector.java b/jetty-server/src/main/java/org/eclipse/jetty/server/nio/BlockingChannelConnector.java index 252c8dc108f..34cb12cb3b6 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/nio/BlockingChannelConnector.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/nio/BlockingChannelConnector.java @@ -32,6 +32,7 @@ import org.eclipse.jetty.io.EofException; import org.eclipse.jetty.io.nio.ChannelEndPoint; import org.eclipse.jetty.server.HttpConnection; import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.util.ConcurrentHashSet; import org.eclipse.jetty.util.log.Log; @@ -50,7 +51,7 @@ import org.eclipse.jetty.util.log.Log; public class BlockingChannelConnector extends AbstractNIOConnector { private transient ServerSocketChannel _acceptChannel; - private final Set _endpoints = Collections.newSetFromMap(new ConcurrentHashMap()); + private final Set _endpoints = new ConcurrentHashSet(); /* ------------------------------------------------------------ */ diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/ConcurrentHashSet.java b/jetty-util/src/main/java/org/eclipse/jetty/util/ConcurrentHashSet.java new file mode 100644 index 00000000000..844db3a7d51 --- /dev/null +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/ConcurrentHashSet.java @@ -0,0 +1,108 @@ +package org.eclipse.jetty.util; + +import java.util.AbstractSet; +import java.util.Collection; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; + +public class ConcurrentHashSet extends AbstractSet implements Set +{ + private final Map _map = new ConcurrentHashMap(); + private transient Set _keys = _map.keySet(); + + public ConcurrentHashSet() + { + } + + @Override + public boolean add(E e) + { + return _map.put(e,Boolean.TRUE) == null; + } + + @Override + public void clear() + { + _map.clear(); + } + + @Override + public boolean contains(Object o) + { + return _map.containsKey(o); + } + + @Override + public boolean containsAll(Collection c) + { + return _keys.containsAll(c); + } + + @Override + public boolean equals(Object o) + { + return o == this || _keys.equals(o); + } + + @Override + public int hashCode() + { + return _keys.hashCode(); + } + + @Override + public boolean isEmpty() + { + return _map.isEmpty(); + } + + @Override + public Iterator iterator() + { + return _keys.iterator(); + } + + @Override + public boolean remove(Object o) + { + return _map.remove(o) != null; + } + + @Override + public boolean removeAll(Collection c) + { + return _keys.removeAll(c); + } + + @Override + public boolean retainAll(Collection c) + { + return _keys.retainAll(c); + } + + @Override + public int size() + { + return _map.size(); + } + + @Override + public Object[] toArray() + { + return _keys.toArray(); + } + + @Override + public T[] toArray(T[] a) + { + return _keys.toArray(a); + } + + @Override + public String toString() + { + return _keys.toString(); + } +}