public static Throwable getRootCause(Throwable ex) {
        Throwable rootCause = ex;
        while (rootCause.getCause() != null) {
            rootCause = rootCause.getCause();
        }
        return rootCause;
    }
Internal class that provides various mapping utilities used throughout the code base. Only intended for internal use.
core/src/main/java/com/github/dozermapper/core/util/MappingUtils.java