Skip to content

Commit

Permalink
[java] Small performance improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Apr 9, 2020
1 parent eb236e5 commit 25c2c9c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public Set<String> getSectionNames() {
return System.getenv().keySet().stream()
// We need at least two "_" characters
.filter(key -> key.split("_").length > 1)
.map(key -> key.substring(0, key.indexOf("_")))
.map(key -> key.substring(0, key.indexOf('_')))
.map(key -> key.toLowerCase(Locale.ENGLISH))
.collect(toImmutableSortedSet(naturalOrder()));
}
Expand Down

0 comments on commit 25c2c9c

Please sign in to comment.