Converter (final Converter converter, final GenericDomValue domValue) { Converter cur = converter; Converter next; int guard = 0; while (cur instanceof WrappingConverter) { next = ((WrappingConverter)cur).getConverter(domValue); if (next == null) break; cur = next; if (guard++ > 10) { throw new RuntimeException("Too deep wrapping for " + converter); } } return cur; }