@@ -26,20 +26,21 @@ component implements="coldbox.system.aop.MethodInterceptor" accessors="true" {
26
26
* The AOP method invocation
27
27
*/
28
28
any function invokeMethod ( required invocation ){
29
+
30
+ // Quick exit check: If no included interceptions, just bail
31
+ if ( ! arrayLen ( variables .includedInterceptions ) ){
32
+ return arguments .invocation .proceed ();
33
+ }
34
+
35
+ // Start target checks
29
36
var targetArgs = arguments .invocation .getArgs ();
30
37
31
- // state
38
+ // Get the state either by name or position
32
39
if ( structKeyExists ( targetArgs , " state" ) ) {
33
40
var state = targetArgs .state ;
34
- } else if ( structKeyExists ( targetArgs , 1 ) ) {
41
+ } else {
35
42
var state = targetArgs [ 1 ];
36
43
}
37
- // data
38
- if ( structKeyExists ( targetArgs , " data" ) ) {
39
- var data = targetArgs .data ;
40
- } else if ( structKeyExists ( targetArgs , 2 ) ) {
41
- var data = targetArgs [ 2 ];
42
- }
43
44
44
45
// Do we need to profile it or not?
45
46
if (
@@ -54,7 +55,15 @@ component implements="coldbox.system.aop.MethodInterceptor" accessors="true" {
54
55
return arguments .invocation .proceed ();
55
56
}
56
57
57
- var txName = " [Interception] #state #" ;
58
+ // Build Transaction name
59
+ var txName = " [Interception] #state #" ;
60
+
61
+ // Get intercept data by name or position
62
+ if ( structKeyExists ( targetArgs , " data" ) ) {
63
+ var data = targetArgs .data ;
64
+ } else {
65
+ var data = targetArgs [ 2 ];
66
+ }
58
67
59
68
// Is this an entity interception? If so, log it to assist
60
69
if ( data .keyExists ( " entity" ) ){
0 commit comments