Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit ecb7406

Browse files
committed
Activate verify by default with Maven and skip valid invocations on super method
Closes gh-770
1 parent 8583528 commit ecb7406

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

spring-aot-maven-plugin/src/main/java/org/springframework/aot/maven/AbstractBootstrapMojo.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ abstract class AbstractBootstrapMojo extends AbstractMojo {
8888
private boolean removeUnusedConfig = true;
8989

9090
@Parameter
91-
private boolean verify;
91+
private boolean verify = true;
9292

9393
@Parameter
9494
private boolean removeYamlSupport;

spring-aot/src/main/java/org/springframework/nativex/type/AtBeanMethodInvocationDetectionVisitor.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,13 @@ public void visitMethodInsn(int opcode, String owner, String name, String descri
101101
if (ownerType.isAtConfiguration()) {
102102
boolean isAtBeanMethod = ownerType.isAtBeanMethod(name,descriptor);
103103
if (isAtBeanMethod) {
104-
if (methodsUsingGetBeanCalls == null) {
105-
methodsUsingGetBeanCalls = new ArrayList<>();
104+
// Filter out valid super.myAtBeanMethod() use cases
105+
if (!name.equals(methodName)) {
106+
if (methodsUsingGetBeanCalls == null) {
107+
methodsUsingGetBeanCalls = new ArrayList<>();
108+
}
109+
methodsUsingGetBeanCalls.add(methodName);
106110
}
107-
methodsUsingGetBeanCalls.add(methodName);
108111
}
109112
} else {
110113
super.visitMethodInsn(opcode, owner, name, descriptor, itface);

0 commit comments

Comments
 (0)