File tree 1 file changed +2
-4
lines changed
core/src/main/java/org/springframework/security/authorization
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 21
21
import io .micrometer .observation .ObservationConvention ;
22
22
import org .aopalliance .intercept .MethodInvocation ;
23
23
24
- import org .springframework .security .authorization .method .MethodInvocationResult ;
25
-
26
24
/**
27
25
* An {@link ObservationConvention} for translating authorizations into {@link KeyValues}.
28
26
*
@@ -85,10 +83,10 @@ private String getObjectType(AuthorizationObservationContext<?> context) {
85
83
if (context .getObject () instanceof MethodInvocation ) {
86
84
return "method" ;
87
85
}
88
- if (context .getObject () instanceof MethodInvocationResult ) {
86
+ String className = context .getObject ().getClass ().getSimpleName ();
87
+ if (className .contains ("Method" )) {
89
88
return "method" ;
90
89
}
91
- String className = context .getObject ().getClass ().getSimpleName ();
92
90
if (className .contains ("Request" )) {
93
91
return "request" ;
94
92
}
You can’t perform that action at this time.
0 commit comments