Skip to content

Use orElseGet for loading Config #10

@vladimirjegorov

Description

@vladimirjegorov

Hi,
Just a small suggestion. It is more reasonable to load config only if the original config is null, and not load always and then comparing both (#See Optional.orElse vs orElseGet) :)

Config configToUse = Optional.ofNullable(config).orElse(ConfigLoader.load());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions