Switch to Java 11
Not planning to switch soon, but to keep some improvements/adjustments that we could make after switching:
- See comments in code referencing this issue
- Use
List.ofandSet.ofwhere appropriate instead of more verboseArrays.asList, etc. !Optional.isPresent=Optional.isEmptycollect(toList())->Stream#toList- Upgrade to Mockito 5
- Remove Mockito exclusion from dependabot.yml
- Handling records requires a lot of reflection acrobatics at the moment
Note
You might see this issue referenced a lot in the code base also for later Java versions. This issue number is used as a general bookmark to note Java differences. If we switch to Java 11, we'll probably change the comments to reference another issue.
Hi, updating to Java 11 just to use these methods doesn't make much sense. Additionally, compatibility with Java 8 is more important in my opinion, as there are older projects that require the use of this JDK version.
However, if there is a way to create a second Jar file that is compatible with Java 8, as they do, for example, with HSQLDB, then you can proceed with the modification.
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.7.1</version>
<classifier>jdk8</classifier>
<type>jar</type>
</dependency>
Thank you.