aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/CtClassType.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/javassist/CtClassType.java')
-rw-r--r--src/main/javassist/CtClassType.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/javassist/CtClassType.java b/src/main/javassist/CtClassType.java
index 627c15cf..29aace81 100644
--- a/src/main/javassist/CtClassType.java
+++ b/src/main/javassist/CtClassType.java
@@ -1400,10 +1400,11 @@ class CtClassType extends CtClass {
int mod = m.getModifiers();
if ((getModifiers() & Modifier.INTERFACE) != 0) {
- m.setModifiers(mod | Modifier.PUBLIC);
- if ((mod & Modifier.ABSTRACT) == 0)
+ if (Modifier.isProtected(mod) || Modifier.isPrivate(mod))
throw new CannotCompileException(
- "an interface method must be abstract: " + m.toString());
+ "an interface method must be public: " + m.toString());
+
+ m.setModifiers(mod | Modifier.PUBLIC);
}
getMembers().addMethod(m);