]> source.dussan.org Git - javassist.git/commitdiff
Now the version number of a class file newly created from scratch may be 51 (Java 7).
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Fri, 28 Sep 2012 17:26:46 +0000 (17:26 +0000)
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Fri, 28 Sep 2012 17:26:46 +0000 (17:26 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@667 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

src/main/javassist/bytecode/ClassFile.java

index 5a6adc7bbbd3b1d32348b574b47db851dd26d3c6..307cc0e86d23bb87d244cf73e059507b0e9af94a 100644 (file)
@@ -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) {}
     }