ldaume/headless-chrome

Use orElseGet for loading Config

vladimirjegorov opened this issue · 0 comments

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());