From: aclement Date: Tue, 17 Nov 2009 16:08:42 +0000 (+0000) Subject: move isAbstractOrNative into the only place they are used X-Git-Tag: V1_6_7~66 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ac9991b033d7b6e27e44c6d327bb67ae0b5c3cf4;p=aspectj.git move isAbstractOrNative into the only place they are used --- diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java index 0ee24f07c..9278bc2f7 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java @@ -196,13 +196,17 @@ public final class LazyMethodGen implements Traceable { } } + private boolean isAbstractOrNative(int modifiers) { + return Modifier.isAbstract(modifiers) || Modifier.isNative(modifiers); + } + public LazyMethodGen(BcelMethod m, LazyClassGen enclosingClass) { savedMethod = m.getMethod(); this.enclosingClass = enclosingClass; - if (!(m.isAbstract() || m.isNative()) && savedMethod.getCode() == null) { + if (!isAbstractOrNative(m.getModifiers()) && savedMethod.getCode() == null) { throw new RuntimeException("bad non-abstract method with no code: " + m + " on " + enclosingClass); } - if ((m.isAbstract() || m.isNative()) && savedMethod.getCode() != null) { + if (isAbstractOrNative(m.getModifiers()) && savedMethod.getCode() != null) { throw new RuntimeException("bad abstract method with code: " + m + " on " + enclosingClass); } // this.memberView = new BcelMethod(enclosingClass.getBcelObjectType(),