cleanup dumps from review
Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
parent
aafb0fcec1
commit
604f2379bd
|
@ -34,6 +34,7 @@ import org.eclipse.jetty.util.IncludeExclude;
|
|||
import org.eclipse.jetty.util.IncludeExcludeSet;
|
||||
import org.eclipse.jetty.util.InetAddressSet;
|
||||
import org.eclipse.jetty.util.component.Dumpable;
|
||||
import org.eclipse.jetty.util.component.DumpableCollection;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
|
||||
|
@ -202,9 +203,9 @@ public class InetAccessHandler extends HandlerWrapper
|
|||
public void dump(Appendable out, String indent) throws IOException
|
||||
{
|
||||
dumpObjects(out, indent,
|
||||
Dumpable.labelled("included", _addrs.getIncluded()),
|
||||
Dumpable.labelled("excluded", _addrs.getExcluded()),
|
||||
Dumpable.labelled("includedConnectorNames", _names.getIncluded()),
|
||||
Dumpable.labelled("excludedConnectorNames", _names.getExcluded()));
|
||||
new DumpableCollection("included", _addrs.getIncluded()),
|
||||
new DumpableCollection("excluded", _addrs.getExcluded()),
|
||||
new DumpableCollection("includedConnectorNames", _names.getIncluded()),
|
||||
new DumpableCollection("excludedConnectorNames", _names.getExcluded()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,9 +26,8 @@ import java.util.Collection;
|
|||
import org.hamcrest.Matchers;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class DumpableCollectionTest
|
||||
public class DumpableTest
|
||||
{
|
||||
|
||||
@Test
|
||||
public void testNullDumpableCollection () throws Exception
|
||||
{
|
||||
|
@ -51,4 +50,13 @@ public class DumpableCollectionTest
|
|||
assertThat(dump, Matchers.containsString("two"));
|
||||
assertThat(dump, Matchers.containsString("three"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDumpableLabelled() throws Exception
|
||||
{
|
||||
String dump = Dumpable.labelled("label", "Item").dump();
|
||||
assertThat(dump, Matchers.containsString("label:"));
|
||||
assertThat(dump, Matchers.containsString("Item"));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue