-
Notifications
You must be signed in to change notification settings - Fork 55
Description
When you build the project using Java 1.8, the compiler has access to all the classes from Java 1.8. This could cause problems at run time in a 1.6 JVM or 1.7 JVM (Hadoop extension), where 1.8 classes are not available.
This is unrelated to #93, which will allow Java 1.8 syntax. Although I have a slight fear that using that syntax might accidentally introduce a dependency on a 1.8 class.
The way to handle this correctly, is it to add compiler argument bootclasspath to the compiler plug-in configuration, pointing to the correct rt.jar. But this puts a burden on each developer as it requires that both JRE 1.6 and JRE 1.7 are installed, and the developer has to set environment variables to point to those JREs.
A solution might be to allow development with Java 1.8 only, and to check if no classes from newer JDKs are used in the modules on the build server. If someone does introduce a future class, then the build for that PR will fail.