Skip to content

Commit

Permalink
Merge pull request #46292 from gsmet/followup-46284
Browse files Browse the repository at this point in the history
Simplify pattern used introduced in #46284
  • Loading branch information
gastaldi authored Feb 16, 2025
2 parents f3068af + c534f77 commit 3c152b7
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,9 @@ public void setupEndpoints(ApplicationIndexBuildItem applicationIndexBuildItem,
return false;
};

final boolean filtersAccessResourceMethod = filtersAccessResourceMethod(
resourceInterceptorsBuildItem.getResourceInterceptors());

BiConsumer<String, BiFunction<String, ClassVisitor, ClassVisitor>> transformationConsumer = (name,
function) -> bytecodeTransformerBuildItemBuildProducer
.produce(new BytecodeTransformerBuildItem(name, function));
Expand Down Expand Up @@ -563,8 +566,6 @@ public void setupEndpoints(ApplicationIndexBuildItem applicationIndexBuildItem,
classLevelExceptionMappers.isPresent() ? classLevelExceptionMappers.get().getMappers()
: Collections.emptyMap())
.setResourceMethodCallback(new Consumer<>() {
Boolean filtersAccessResourceMethod;

@Override
public void accept(EndpointIndexer.ResourceMethodCallbackEntry entry) {
MethodInfo method = entry.getMethodInfo();
Expand All @@ -591,11 +592,6 @@ public void accept(EndpointIndexer.ResourceMethodCallbackEntry entry) {
.build());
}

if (filtersAccessResourceMethod == null) {
filtersAccessResourceMethod = filtersAccessResourceMethod(
resourceInterceptorsBuildItem.getResourceInterceptors());
}

boolean paramsRequireReflection = false;
for (short i = 0; i < method.parametersCount(); i++) {
Type parameterType = method.parameterType(i);
Expand Down

0 comments on commit 3c152b7

Please sign in to comment.