Issue #2998 Add key to DebugListener dump; ensure LoginService dumped
only once.
This commit is contained in:
parent
0236f4064a
commit
8eb21f84a3
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -766,11 +766,7 @@ 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",_constraintMap.entrySet()));
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue