diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2012-02-15 04:44:56 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2012-02-15 04:44:56 +0000 |
commit | 205b65d96c5fb9d0086eb98d31e21e927d79cf27 (patch) | |
tree | 3291bc8e8eebd667212477e7688278af88b6c227 /src/main/javassist/bytecode/ClassFile.java | |
parent | cbc67704adef11473329e901ec99f3563be78de4 (diff) | |
download | javassist-205b65d96c5fb9d0086eb98d31e21e927d79cf27.tar.gz javassist-205b65d96c5fb9d0086eb98d31e21e927d79cf27.zip |
fixed JASSIST-155
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@613 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/bytecode/ClassFile.java')
-rw-r--r-- | src/main/javassist/bytecode/ClassFile.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/javassist/bytecode/ClassFile.java b/src/main/javassist/bytecode/ClassFile.java index c3fb10d9..5a6adc7b 100644 --- a/src/main/javassist/bytecode/ClassFile.java +++ b/src/main/javassist/bytecode/ClassFile.java @@ -89,8 +89,11 @@ public final class ClassFile { /** * The major version number of class files created - * from scratch. The default value is 47 (JDK 1.3) - * or 49 (JDK 1.5) if the JVM supports <code>java.lang.StringBuilder</code>. + * from scratch. The default value is 47 (JDK 1.3). + * It is 49 (JDK 1.5) + * 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>. */ public static int MAJOR_VERSION = JAVA_3; @@ -98,6 +101,8 @@ public final class ClassFile { try { Class.forName("java.lang.StringBuilder"); MAJOR_VERSION = JAVA_5; + Class.forName("java.util.zip.DeflaterInputStream"); + MAJOR_VERSION = JAVA_6; } catch (Throwable t) {} } @@ -796,7 +801,7 @@ public final class ClassFile { } /** - * Writes a class file represened by this object into an output stream. + * Writes a class file represented by this object into an output stream. */ public void write(DataOutputStream out) throws IOException { int i, n; |