fixed Java 8 build

This commit is contained in:
anhefti 2020-02-12 15:06:46 +01:00
parent 5249674be3
commit 8ea0def877
2 changed files with 359 additions and 351 deletions

View file

@ -177,6 +177,14 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>10</source>
<target>10</target>
</configuration>
</plugin>
</plugins>
</build>

View file

@ -169,9 +169,9 @@ public final class Utils {
}
public static <T extends Enum<T>> Collection<Tuple<String>> createSelectionResource(final Class<T> enumClass) {
return Arrays.stream(enumClass.getEnumConstants())
return Collections.unmodifiableList(Arrays.stream(enumClass.getEnumConstants())
.map(e -> new Tuple<>(e.name(), e.name()))
.collect(Collectors.toUnmodifiableList());
.collect(Collectors.toList()));
}
public static Collection<String> getListOfLines(final String list) {