Skip to content

Commit

Permalink
Remove Reference to MethodInvocationResult
Browse files Browse the repository at this point in the history
Closes gh-14794
  • Loading branch information
jzheaux committed Mar 22, 2024
1 parent ce9f182 commit 7162046
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import io.micrometer.observation.ObservationConvention;
import org.aopalliance.intercept.MethodInvocation;

import org.springframework.security.authorization.method.MethodInvocationResult;

/**
* An {@link ObservationConvention} for translating authorizations into {@link KeyValues}.
*
Expand Down Expand Up @@ -85,10 +83,10 @@ private String getObjectType(AuthorizationObservationContext<?> context) {
if (context.getObject() instanceof MethodInvocation) {
return "method";
}
if (context.getObject() instanceof MethodInvocationResult) {
String className = context.getObject().getClass().getSimpleName();
if (className.contains("Method")) {
return "method";
}
String className = context.getObject().getClass().getSimpleName();
if (className.contains("Request")) {
return "request";
}
Expand Down

0 comments on commit 7162046

Please sign in to comment.