Skip to content
Permalink
Browse files
No need to nest in else.
  • Loading branch information
garydgregory committed Mar 5, 2021
1 parent b6e86e5 commit ca6508ab1e09ba174ff260bda3a55b672272e099
Showing 2 changed files with 4 additions and 6 deletions.
@@ -361,12 +361,11 @@ protected void visitNonImportedMethodInsn(final int opcode, final String owner,
final Type ownerType = Type.getObjectType(owner);
final Method method = new Method(name, desc);

if (isAccessible(ownerType) && isAccessible(ownerType, method)) {
super.visitNonImportedMethodInsn(opcode, owner, name, desc, itf);
} else {
if (!isAccessible(ownerType) || !isAccessible(ownerType, method)) {
throw new IllegalStateException(String.format("Blueprint method %s.%s calls inaccessible method %s.%s",
this.owner, methodKey.getRight(), owner, method));
}
super.visitNonImportedMethodInsn(opcode, owner, name, desc, itf);
}

@Override
@@ -39,11 +39,10 @@ public boolean clean(final WeaveEnvironment environment, final Scanner scanner)
WeaveInterest.of(TestAnnotation.class, ElementType.METHOD));

for (final WeavableClass<?> weavableClass : scanner.scan(scanRequest).getClasses()) {
if (environment.deleteClassfile(weavableClass.getTarget())) {
result = true;
} else {
if (!environment.deleteClassfile(weavableClass.getTarget())) {
break;
}
result = true;
}
return result;
}

0 comments on commit ca6508a

Please sign in to comment.