private String getObjectType(final Object object) {
        if (object instanceof HasType) {
            return String.valueOf(((HasType) object).getType());
        }

        final ObjectInfoProvider objectInfoProvider = getInfoAppender(object.getClass());
        if (objectInfoProvider == null) {
            if (object instanceof Collection) {
                Collection<?> collection = (Collection<?>) object;
                if (collection.isEmpty()) {
                    return "Empty collection";
                } else {
                    return "Collection containing " + (long) collection.size() + " "
                           + collection.stream().findFirst().get().getClass().getSimpleName() +
                           " and possibly other objects";
                }
            }
            return object.getClass().getSimpleName();
        }
        return objectInfoProvider.getObjectType(object);
    }
Shallow merge of the two Purpose objects
stroom-event-logging/stroom-event-logging-impl/src/main/java/stroom/event/logging/impl/StroomEventLoggingServiceImpl.java