Skip to content

Commit

Permalink
[java] MInor performance improvement: no need to load options if sect…
Browse files Browse the repository at this point in the history
…ion name is empty
  • Loading branch information
barancev committed Apr 14, 2020
1 parent c362911 commit de98d76
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ public boolean dumpConfig(Config config, PrintStream dumpTo) {

Map<String, Map<String, Object>> toOutput = new TreeMap<>();
for (String section : config.getSectionNames()) {
if (IGNORED_SECTIONS.contains(section)) {
if (section.isEmpty() || IGNORED_SECTIONS.contains(section)) {
continue;
}

Set<String> allOptions = config.getOptions(section);
if (section.isEmpty() || allOptions.isEmpty()) {
if (allOptions.isEmpty()) {
continue;
}

Expand Down

0 comments on commit de98d76

Please sign in to comment.