Commit c6f37ef
committed
Fix NullPointerException in ASMCacheManager constructor and getInstance()
- Add null check for config parameter in getInstance() to prevent NPE before accessing getCacheDirectory()
- Add null check for config parameter in constructor before accessing config fields
- Add null/empty validation for cacheDirectory in constructor before calling Paths.get()
- Use direct field access (config.cacheDirectory) instead of getter after null check
- Add logging when null config or cache directory is detected
This fixes the ConcurrentHashMap.putVal NPE that was occurring during ContainerCoordinator.createCacheManager() initialization.
Resolves: java.lang.NullPointerException at ConcurrentHashMap.putVal in createCacheManager1 parent 7e472fa commit c6f37ef
1 file changed
Lines changed: 21 additions & 1 deletion
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
49 | 55 | | |
50 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
51 | 65 | | |
52 | 66 | | |
53 | 67 | | |
| |||
117 | 131 | | |
118 | 132 | | |
119 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
120 | 140 | | |
121 | 141 | | |
122 | 142 | | |
| |||
0 commit comments