(Object o, String prefix)
| 603 | } |
| 604 | |
| 605 | private static void printRec(Object o, String prefix) { |
| 606 | if (o instanceof Collection) { |
| 607 | LOG.info("{} {} ({}) [", prefix, o, o.getClass()); |
| 608 | for (Object sub : (Collection) o) { |
| 609 | printRec(sub, prefix + " "); |
| 610 | } |
| 611 | LOG.info("{} ]", prefix); |
| 612 | } else if (o instanceof Map) { |
| 613 | Map<?, ?> m = (Map<?, ?>) o; |
| 614 | LOG.info("{} {} ({}) {", prefix, o, o.getClass()); |
| 615 | for (Map.Entry<?, ?> entry : m.entrySet()) { |
| 616 | printRec(entry.getKey(), prefix + " "); |
| 617 | LOG.info("{} ->", prefix); |
| 618 | printRec(entry.getValue(), prefix + " "); |
| 619 | } |
| 620 | LOG.info("{} }", prefix); |
| 621 | } else { |
| 622 | LOG.info("{} {} ({})", prefix, o, o.getClass()); |
| 623 | } |
| 624 | } |
| 625 | |
| 626 | /** |
| 627 | * Check if two collections are equivalent ignoring the order of elements. |
no test coverage detected