- Updated Jenkinsfiles
- Updated .classpath files (assuming Eclipse is Java 16 ready)
- Add import org.jooq.Record where needed (org.jooq.* no longer works)
- Workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=572873
- Backport text blocks to pre Java 16
- Backport record types to pre Java 16
- Added a few record types to sources
- Upgraded dependencies to build with Java 16+
- Backport pattern matching
Runtime library - language usage
- Removed [java-8] tags
- Removed F functional interfaces
- Removed Meta.Predicate functional interfaces
- Converted anonymous classes to lambdas
- Removed some explicit final keywords where effectively final works
- Removed Java 6 Jenkinsfile
- try-with-resources
- Merged some catch blocks
- Get rid of type witnesses where possible
Runtime library - JDK API usage
- Prefer Collection.sort() over Collections.sort()
- Use Map.computeIfAbsent for Map<K, List<V>> lazy initialisation
- Replace Iterator::remove calls by Collection::removeIf
- Use Map::computeIfAbsent for Map<K, List<V>> lazy initialisation
- Replace Iterator::remove calls by Collection::removeIf
- Use Comparator::comparing and Comparator::thenComparing
- Use Stream API where not performance critical
- Replaced Map::entrySet iterations by Map::forEach
- Use ResultQuery::collect
- Map::putIfAbsent
Code generation
- Generate lambda for LazySchema's LazySupplier
Unrelated
- Applied a few IntelliJ inspections
- Remove unnecessary explicit array creation
The jOOQ 3.12 Open Source Edition will continue to support Java 8. The only things we gain from the JDK 11 dependency is:
- Updated logic for reflection when mapping into proxied default methods (that stuff has changed completely in JDK 9). This is a regression, which we can live with. The workaround is to write a custom
- Explicit dependency on the JDK 9 API, for which we provide a Java 8 compatible alternative via reactive streams anyway.
- JDBC 4.3 compatibility (mostly sharding). We currently don't use that yet.
We're not even using internally, outside of a few integration tests. So, we'll postpone the JDK 11 *requirement* (while supporting it nonetheless) to a later release, e.g. 3.13. We'll observe market share shifts. Currently Java 11's market share is a bit of a disappointment, so making it a requirement might be premature.
The formatting logic is encapsulated by the new internal `XMLBuilder`
class which also required a new internal interface `XMLAppendable` which
is implemented by all XJC generated classes.
The XJC plugin was modified accordingly and all code was regenerated.
Also note that the `MiniJAXB` class was moved to package
`org.jooq.util.jaxb.tools`.
Using the new <onError/> (which accepts the values FAIL (default), LOG,
and SILENT) the generator's behavior on an encountered exceptions can be
controlled.