Commit 713a41a
authored
Simplify type outlines to not implement type.getDeclaringType() and type.getEnclosingType() (#9644)
These methods are not used for matching purposes, so don't need to be maintained in outlines.
There is one use of type.isAnonymousType() in IAST, but this is under a support flag - I could not find any active use of that support flag. To satisfy the original use-case (involving MyBatis) we add a simple anonymous type heuristic to that particular instrumentation, based on the '$number' Java language convention for anonymous class names.
( If necessary we can further enhance that specialized matcher without incurring overhead for all outline parsing )
Note: if anything does touch type.getDeclaringType() / type.getEnclosingType() later on when doing the final transformation then the outline type is automatically inflated to a full type. (This is already the case for other methods that aren't available in type outlines.)
We also drop type.getClassFileVersion() from outlines for the same reason.1 parent 225e336 commit 713a41a
File tree
5 files changed
+25
-70
lines changed- dd-java-agent
- agent-tooling/src
- main/java/datadog/trace/agent/tooling/bytebuddy/outline
- test/groovy/datadog/trace/agent/tooling/bytebuddy/outline
- instrumentation/iast-instrumenter/src/main/java/datadog/trace/instrumentation/iastinstrumenter
5 files changed
+25
-70
lines changedLines changed: 1 addition & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | | - | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
42 | 40 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 41 | | |
49 | 42 | | |
50 | 43 | | |
| |||
91 | 84 | | |
92 | 85 | | |
93 | 86 | | |
94 | | - | |
95 | 87 | | |
96 | 88 | | |
97 | 89 | | |
| |||
105 | 97 | | |
106 | 98 | | |
107 | 99 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 100 | + | |
125 | 101 | | |
126 | 102 | | |
127 | 103 | | |
| |||
Lines changed: 0 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | 386 | | |
392 | 387 | | |
393 | 388 | | |
| |||
Lines changed: 1 addition & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | | - | |
31 | 29 | | |
32 | 30 | | |
33 | 31 | | |
34 | | - | |
35 | | - | |
36 | 32 | | |
37 | 33 | | |
38 | 34 | | |
39 | 35 | | |
40 | 36 | | |
41 | 37 | | |
42 | | - | |
| 38 | + | |
43 | 39 | | |
44 | | - | |
45 | 40 | | |
46 | 41 | | |
47 | 42 | | |
| |||
72 | 67 | | |
73 | 68 | | |
74 | 69 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | 70 | | |
89 | 71 | | |
90 | 72 | | |
| |||
114 | 96 | | |
115 | 97 | | |
116 | 98 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | 99 | | |
123 | 100 | | |
124 | 101 | | |
| |||
136 | 113 | | |
137 | 114 | | |
138 | 115 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | 116 | | |
149 | 117 | | |
150 | 118 | | |
| |||
165 | 133 | | |
166 | 134 | | |
167 | 135 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | 136 | | |
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
79 | 98 | | |
80 | 99 | | |
81 | 100 | | |
82 | 101 | | |
83 | | - | |
| 102 | + | |
84 | 103 | | |
85 | 104 | | |
86 | 105 | | |
| |||
0 commit comments