Commit 001acbd
committed
Return empty maps from feature getters
Ensure getters in FeaturesProperties return java.util.Collections.emptyMap() when underlying fields are null to avoid returning null and potential NPEs. Adds a static import for emptyMap and applies the change to getAbstract() and getNamed() methods.1 parent 8b18437 commit 001acbd
1 file changed
Lines changed: 7 additions & 0 deletions
File tree
- microsphere-spring-cloud-commons/src/main/java/io/microsphere/spring/cloud/client/actuator
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
55 | 62 | | |
56 | 63 | | |
57 | 64 | | |
0 commit comments