summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2007-08-14 02:08:01 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2007-08-14 02:08:01 +0000
commit02ec64cfa08262fd56787606f40bb7137c3e36ad (patch)
treee67bdc6dcd47ce24e7e3e37184371e50ee1c41cd
parent2f7efd86200e7f76130224a76259c1a747c87c5c (diff)
downloadjavassist-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.java4
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;