[hibernate-dev] IntelliJ 16 and Java 8 for tests

Steve Ebersole steve at hibernate.org
Tue Feb 16 10:18:47 EST 2016

We have been having an ongoing discussion about using Java 8 features in
tests.  My only argument against that was the fact that doing so makes it
impossible to run tests in IDE (IntelliJ at least) unless I set the
"language level" for the whole module to Java 8 which means I possibly miss
using Java 8 calls in src/main.

Well IntelliJ 16 is in EAP and I have been using it for almost a week now.
One of its major changes is a move to a more Gradle-like view of a module
on importing a Gradle project.  So when I import ORM,  hibernate-core e.g.
is split up into 2 IntelliJ modules... or more correctly one per
SourceSet.  Now I can set the "language level" independently of main versus

So once IntelliJ 16 becomes more stable, I think we can consider allowing
Java 8 features in tests if anyone still wants to.

More information about the hibernate-dev mailing list