Without doubt, the module system (JPMS) is the most prominent feature of Java 9. But there are many other useful additions to the JDK, which have not been discussed as widely yet.
One of them is the new ToolProvider SPI, which defines a uniform way to invoke all the tools coming with the JDK (e.g. jar, jlink etc.) in a programmatic way.
E.g. imagine you’d like to create a JAR archive from within your Java application.
Before Java 9, you had two options to do so:
Start a separate process to run the jar binary
Find out which classes are used by the jar command internally and invoke them directly
Neither option is ideal.
The former incurs some overhead for forking an OS level process and it requires a bit of coding to locate the binary to execute in the Java home directory and to correctly capture any output of the forked process.
The second option doesn’t come with the disadvantages of forking a new process, but it requires knowledge about the implementation of the tool to execute.
So for instance in the case of the jar command, you’d have to know that java.util.jar.JarOutputStream is used to produce JAR files.
Hibernate Validator is not the only Bean Validation implementation out there, we have one (friendly) competitor called Apache BVal.
Apache BVal has not caught up with Bean Validation 2.0 yet but, as the last benchmark in the Bean Validation field is dated from 2010 (remember "Machete don’t text"?), I thought it was high time to revisit this benchmark and get some fresh numbers.
Especially with all the optimization work we made for 6.0.
As you can see, the Hibernate websites
(hibernate.org and in.relation.to)
just got a facelift!
We made them prettier than ever, but we also added more information
and made sure that you will find what you want even more easily than before.