327469 removed needless java6 dependencies

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2340 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2010-10-11 23:17:47 +00:00
parent 47d49cf8da
commit 3df18cb180
4 changed files with 112 additions and 2 deletions

View File

@ -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

View File

@ -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);

View File

@ -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<BlockingChannelEndPoint> _endpoints = Collections.newSetFromMap(new ConcurrentHashMap<BlockingChannelEndPoint,Boolean>());
private final Set<BlockingChannelEndPoint> _endpoints = new ConcurrentHashSet<BlockingChannelEndPoint>();
/* ------------------------------------------------------------ */

View File

@ -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<E> extends AbstractSet<E> implements Set<E>
{
private final Map<E, Boolean> _map = new ConcurrentHashMap<E, Boolean>();
private transient Set<E> _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<E> 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> T[] toArray(T[] a)
{
return _keys.toArray(a);
}
@Override
public String toString()
{
return _keys.toString();
}
}