Skip to content

configuration loading should not manage InputStream, use libs instead #6

@FedorRomanov

Description

@FedorRomanov

Configuration::readConfiguration(@Nonnull final String uri) should use time-proven libs to load config remotely/locally instead of managing low-level details. Taking advantage of the libs reduce length of the method and improve readability by hiding low-level details.

  1. For loading text file over http/https use apache http client EntityUtils
  2. For loading text file from local filesystem, use Java7 API, e.g. new String(Files.readAllBytes(Paths.get(new File(uri))))
  3. For loading from classpath, use ClassPathResource in solution above

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions