]> source.dussan.org Git - aspectj.git/commitdiff
move isAbstractOrNative into the only place they are used
authoraclement <aclement>
Tue, 17 Nov 2009 16:08:42 +0000 (16:08 +0000)
committeraclement <aclement>
Tue, 17 Nov 2009 16:08:42 +0000 (16:08 +0000)
weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java

index 0ee24f07c9d10406f28ce209a0d8feb35191d2c9..9278bc2f7422e2454ab5a7bad576d11db33f35ef 100644 (file)
@@ -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(),