private Optional<String> getDottedKeyName(final OptionSpec spec) {
    List<String> foundNames = new ArrayList<>();

    Arrays.stream(spec.names())
        .forEach(
            nextSpecName -> {
              String specName =
                  result.keyPathSet().stream()
                      .filter(option -> option.contains(nextSpecName.replaceFirst("^-+", "")))
                      .findFirst()
                      .orElse(new ArrayList<>())
                      .stream()
                      .collect(Collectors.joining("."));
              if (specName.length() > 0) {
                foundNames.add(specName);
              }
            });

    return foundNames.stream().findFirst();
  }
Creates a new TomlConfigurationDefaultProvider from an input stream.

@param commandLine the command line
@param inputStream the input stream
@return a new TomlConfigurationDefaultProvider
app/src/main/java/org/hyperledger/besu/cli/util/TomlConfigurationDefaultProvider.java