diff --git a/CHANGES b/CHANGES index e77f64b2..9a29e3e9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,11 @@ HikariCP Changes +Changes in 2.4.2 + + * Fixed issue with proxy generation whereby the generated classes contain the + major version number for Java 8, which makes them incompatible with the Java 7 + runtime. + Changes in 2.4.1 * issue 380: housekeeper was not being scheduled in the case of a user specified diff --git a/src/main/java/com/zaxxer/hikari/util/JavassistProxyFactory.java b/src/main/java/com/zaxxer/hikari/util/JavassistProxyFactory.java index ba192e7f..bb4329b2 100644 --- a/src/main/java/com/zaxxer/hikari/util/JavassistProxyFactory.java +++ b/src/main/java/com/zaxxer/hikari/util/JavassistProxyFactory.java @@ -42,6 +42,7 @@ import javassist.CtNewMethod; import javassist.LoaderClassPath; import javassist.Modifier; import javassist.NotFoundException; +import javassist.bytecode.ClassFile; /** * This class generates the proxy objects for {@link Connection}, {@link Statement}, @@ -190,6 +191,7 @@ public final class JavassistProxyFactory } } + targetCt.getClassFile().setMajorVersion(ClassFile.JAVA_7); targetCt.writeFile("target/classes"); }