Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.

This commit is contained in:
Simone Bordet 2018-10-23 13:33:01 +02:00
commit 3811555764
6 changed files with 20 additions and 13 deletions

View File

@ -153,7 +153,7 @@ public abstract class AbstractLoginService extends AbstractLifeCycle implements
@Override
public String toString()
{
return this.getClass().getSimpleName()+"["+_name+"]";
return String.format("%s@%x[%s]", this.getClass().getSimpleName(), hashCode(), _name);
}

View File

@ -767,13 +767,9 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
@Override
public void dump(Appendable out,String indent) throws IOException
{
// TODO these should all be beans
dumpBeans(out, indent,
getLoginService(),
getIdentityService(),
getAuthenticator(),
DumpableCollection.from("roles",_roles),
DumpableCollection.from("constraints",_constraintMappings));
DumpableCollection.from("roles", _roles),
DumpableCollection.from("constraints", _constraintMappings));
}
/* ------------------------------------------------------------ */

View File

@ -42,6 +42,7 @@ import org.eclipse.jetty.util.annotation.ManagedAttribute;
import org.eclipse.jetty.util.annotation.ManagedObject;
import org.eclipse.jetty.util.annotation.Name;
import org.eclipse.jetty.util.component.AbstractLifeCycle;
import org.eclipse.jetty.util.component.Dumpable;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
@ -127,12 +128,16 @@ public class DebugListener extends AbstractLifeCycle implements ServletContextLi
if (_dumpContext)
{
if (_out==null)
{
handler.dumpStdErr();
System.err.println(Dumpable.KEY);
}
else
{
try
{
handler.dump(_out);
_out.println(Dumpable.KEY);
}
catch(Exception e)
{

View File

@ -679,7 +679,11 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
_durableListeners.add(listener);
if (listener instanceof ContextScopeListener)
{
_contextListeners.add((ContextScopeListener)listener);
if (__context.get()!=null)
((ContextScopeListener)listener).enterScope(__context.get(),null,"Listener registered");
}
if (listener instanceof ServletContextListener)
_servletContextListeners.add((ServletContextListener)listener);

View File

@ -71,7 +71,6 @@ public class ListenerHolder extends BaseHolder<EventListener>
_listener = listener;
_extInstance=true;
setHeldClass(_listener.getClass());
setClassName(_listener.getClass().getName());
}

View File

@ -20,7 +20,6 @@ package org.eclipse.jetty.util.thread;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.concurrent.BlockingQueue;
@ -625,11 +624,15 @@ public class QueuedThreadPool extends ContainerLifeCycle implements SizedThreadP
}
}
List<Runnable> jobs = Collections.emptyList();
if (isDetailedDump())
jobs = new ArrayList<>(getQueue());
dumpBeans(out, indent, new DumpableCollection("threads",threads), new DumpableCollection("jobs", jobs));
{
List<Runnable> jobs = new ArrayList<>(getQueue());
dumpBeans(out, indent, new DumpableCollection("threads", threads), new DumpableCollection("jobs", jobs));
}
else
{
dumpBeans(out, indent, new DumpableCollection("threads", threads));
}
}
@Override