diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2007-08-14 02:08:01 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2007-08-14 02:08:01 +0000 |
commit | 02ec64cfa08262fd56787606f40bb7137c3e36ad (patch) | |
tree | e67bdc6dcd47ce24e7e3e37184371e50ee1c41cd | |
parent | 2f7efd86200e7f76130224a76259c1a747c87c5c (diff) | |
download | javassist-02ec64cfa08262fd56787606f40bb7137c3e36ad.tar.gz javassist-02ec64cfa08262fd56787606f40bb7137c3e36ad.zip |
fixed a bug of ClassPool#makeInterface()
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@403 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
-rw-r--r-- | src/main/javassist/CtNewClass.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/javassist/CtNewClass.java b/src/main/javassist/CtNewClass.java index 12b18465..a95414af 100644 --- a/src/main/javassist/CtNewClass.java +++ b/src/main/javassist/CtNewClass.java @@ -29,12 +29,14 @@ class CtNewClass extends CtClassType { super(name, cp); wasChanged = true; String superName; - if (superclass == null) + if (isInterface || superclass == null) superName = null; else superName = superclass.getName(); classfile = new ClassFile(isInterface, name, superName); + if (isInterface && superclass != null) + classfile.setInterfaces(new String[] { superclass.getName() }); setModifiers(Modifier.setPublic(getModifiers())); hasConstructor = isInterface; |