code: public static <F extends ConfigurationComponent<F>> F mergeConfiguration(final F local, final F defaults, final Supplier<F> merge) {
          return Optional.ofNullable(defaults).map(v -> merge.get()).orElse(local);
      }
docs: Merges (nullable) local configuration with (nullable) default configuration for a given custom merge function
  
  @param local    local configuration object
  @param defaults default configuration object
  @param merge    the merge function
  @param <F>      the configuration object type
  @return the merged configuration