Commit f32fb96
committed
<fix>[errorcode]: address review — null-safe message fallback and avoid loader init
- GlobalErrorCodeI18nServiceImpl: add final fallback to error.code/empty string
when both details and description are null, guaranteeing message is never null
- Platform: use existing loader field instead of getComponentLoader() to avoid
triggering ComponentLoader creation during early startup; move message fallback
outside catch block so it always runs
Co-Authored-By: ye.zou <ye.zou@zstack.io>
Change-Id: I8571f05657dc2173cc232b511f505eedc68d714e1 parent 1dc68d2 commit f32fb96
2 files changed
Lines changed: 12 additions & 8 deletions
File tree
- core/src/main/java/org/zstack/core
- errorcode
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
992 | 992 | | |
993 | 993 | | |
994 | 994 | | |
995 | | - | |
996 | | - | |
997 | | - | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
998 | 1001 | | |
999 | 1002 | | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
1004 | 1007 | | |
1005 | 1008 | | |
1006 | 1009 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| |||
0 commit comments