diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2007-05-05 03:47:52 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2007-05-05 03:47:52 +0000 |
commit | b2696762829078309af7b7b3b7e29fc599d01cda (patch) | |
tree | 9c6f272b2e18d53bf3792512b8ae9875f791fef5 /src/main/javassist/bytecode | |
parent | 5eed6f04d8abf9d796f58fe7e0bb2cfce3e097e0 (diff) | |
download | javassist-b2696762829078309af7b7b3b7e29fc599d01cda.tar.gz javassist-b2696762829078309af7b7b3b7e29fc599d01cda.zip |
Javassist has been producing an interface with a wrong modifier. I fixed this.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@367 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/bytecode')
-rw-r--r-- | src/main/javassist/bytecode/ClassFile.java | 8 | ||||
-rw-r--r-- | src/main/javassist/bytecode/ClassFileWriter.java | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/main/javassist/bytecode/ClassFile.java b/src/main/javassist/bytecode/ClassFile.java index 82221d45..50b6cacd 100644 --- a/src/main/javassist/bytecode/ClassFile.java +++ b/src/main/javassist/bytecode/ClassFile.java @@ -68,8 +68,7 @@ public final class ClassFile { constPool = new ConstPool(classname); thisClass = constPool.getThisClassInfo(); if (isInterface) - accessFlags = AccessFlag.SUPER | AccessFlag.INTERFACE - | AccessFlag.ABSTRACT; + accessFlags = AccessFlag.INTERFACE | AccessFlag.ABSTRACT; else accessFlags = AccessFlag.SUPER; @@ -237,7 +236,10 @@ public final class ClassFile { * @see javassist.bytecode.AccessFlag */ public void setAccessFlags(int acc) { - accessFlags = acc | AccessFlag.SUPER; + if ((acc & AccessFlag.INTERFACE) == 0) + acc |= AccessFlag.SUPER; + + accessFlags = acc; } /** diff --git a/src/main/javassist/bytecode/ClassFileWriter.java b/src/main/javassist/bytecode/ClassFileWriter.java index 2d667a86..b4f83895 100644 --- a/src/main/javassist/bytecode/ClassFileWriter.java +++ b/src/main/javassist/bytecode/ClassFileWriter.java @@ -45,7 +45,8 @@ public class ClassFileWriter { int mod = AccessFlag.toModifier(cf.getAccessFlags() & ~AccessFlag.SYNCHRONIZED); - out.println("major: " + cf.major + ", minor: " + cf.minor); + out.println("major: " + cf.major + ", minor: " + cf.minor + + "modifiers: " + Integer.toHexString(cf.getAccessFlags())); out.println(Modifier.toString(mod) + " class " + cf.getName() + " extends " + cf.getSuperclass()); |