Skip to content

Commit

Permalink
moditect#47 Make the building of the unmodifiable options map Java 8 …
Browse files Browse the repository at this point in the history
…compliant
  • Loading branch information
tbsfrdrch authored and gunnarmorling committed Mar 24, 2019
1 parent eac688a commit 2309627
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ public String getFrom(Map<String, String> options) {

public DeptectiveOptions(String... args) {
if (args != null) {
this.options = Arrays.stream(args)
.map(o -> o.split("="))
.collect(Collectors.toUnmodifiableMap(o -> o[0], o -> o[1]));
this.options = Collections.unmodifiableMap(
Arrays.stream(args)
.map(o -> o.split("="))
.collect(Collectors.toMap(o -> o[0], o -> o[1]))
);
}
else {
this.options = Collections.emptyMap();
Expand Down

0 comments on commit 2309627

Please sign in to comment.