private static <T> Optional<Constructor<T>> getJsonCreatorConstructor(final BeanDescription beanDescription) {
        final List<Constructor<T>> jsonCreatorConstructors = beanDescription.getConstructors()
                .stream()
                .map(constructor -> (Constructor<T>) constructor.getAnnotated())
                .filter(constructor ->
                        constructor.isAnnotationPresent(JsonCreator.class))
                .collect(Collectors.toList());

        final Optional<Constructor<T>> optConstructor;
        if (!jsonCreatorConstructors.isEmpty()) {
            if (jsonCreatorConstructors.size() > 1) {
                LOGGER.warn("Found multiple @JsonCreator annotations on {}. Using first one.",
                        beanDescription.getBeanClass().getName());
            }
            final Constructor<T> constructor = jsonCreatorConstructors.get(0);

            optConstructor = Optional.of(constructor);
        } else {
            optConstructor = Optional.empty();
        }
        return optConstructor;
    }
@return otherValue if it is non-null or copyNulls is true, else thisValue
stroom-util/src/main/java/stroom/util/config/PropertyUtil.java