Commit 1825f1c
fix: avoid NPE from Auxiliary.class.getPackage() on JDK 8
On JDK 8, Class.getPackage() returns null for classes dynamically
defined on the bootstrap classloader because the VM package table is
only populated for file-loaded classes. Derive the package path from
Class.getName() instead.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 672ddc2 commit 1825f1c
File tree
2 files changed
+12
-3
lines changed- btrace-instr/src/test/java/org/openjdk/btrace/instr
- btrace-runtime/src/main/java/org/openjdk/btrace/runtime
2 files changed
+12
-3
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| |||
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
46 | 55 | | |
47 | 56 | | |
48 | 57 | | |
| |||
140 | 149 | | |
141 | 150 | | |
142 | 151 | | |
143 | | - | |
| 152 | + | |
144 | 153 | | |
145 | 154 | | |
146 | 155 | | |
147 | | - | |
| 156 | + | |
148 | 157 | | |
149 | 158 | | |
150 | 159 | | |
| |||
0 commit comments