Commit 77fdd7c
committed
Move InstrumentationModuleInstaller creation from field initializer to extend()
InstrumentationLoader is instantiated by ServiceLoader (no-arg constructor),
at which point InstrumentationHolder.getInstrumentation() is still null.
Moving the requireNonNull + construction into extend() defers it to when
Instrumentation is guaranteed to be available, fixing the NPE.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>1 parent 6a84aef commit 77fdd7c
1 file changed
Lines changed: 6 additions & 5 deletions
File tree
- javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/instrumentation
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 27 | | |
32 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
0 commit comments