diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2012-09-28 17:26:46 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2012-09-28 17:26:46 +0000 |
commit | 4bb250d87945004584fa28f44afb261785d45a42 (patch) | |
tree | 6e4b5e3ea3b4b8bf46e37ece6f4edac14b9a555d | |
parent | d58f611274b91ff23e521db513107189b0991ca0 (diff) | |
download | javassist-4bb250d87945004584fa28f44afb261785d45a42.tar.gz javassist-4bb250d87945004584fa28f44afb261785d45a42.zip |
Now the version number of a class file newly created from scratch may be 51 (Java 7).
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@667 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
-rw-r--r-- | src/main/javassist/bytecode/ClassFile.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/javassist/bytecode/ClassFile.java b/src/main/javassist/bytecode/ClassFile.java index 5a6adc7b..307cc0e8 100644 --- a/src/main/javassist/bytecode/ClassFile.java +++ b/src/main/javassist/bytecode/ClassFile.java @@ -94,6 +94,8 @@ public final class ClassFile { * if the JVM supports <code>java.lang.StringBuilder</code>. * It is 50 (JDK 1.6) * if the JVM supports <code>java.util.zip.DeflaterInputStream</code>. + * It is 51 (JDK 1.7) + * if the JVM supports <code>java.lang.invoke.CallSite</code>. */ public static int MAJOR_VERSION = JAVA_3; @@ -103,6 +105,8 @@ public final class ClassFile { MAJOR_VERSION = JAVA_5; Class.forName("java.util.zip.DeflaterInputStream"); MAJOR_VERSION = JAVA_6; + Class.forName("java.lang.invoke.CallSite"); + MAJOR_VERSION = JAVA_7; } catch (Throwable t) {} } |