Commit b4fa482
FINERACT-2421: Fix potential NullPointerException in CalendarCommandFromApiJsonDeserializer
The extractBooleanNamed method can return null when the JSON value is null
or missing. Using primitive boolean causes automatic unboxing which throws
NullPointerException.
Changes:
- CalendarCommandFromApiJsonDeserializer: Use Boolean wrapper instead of
primitive boolean for 'repeating' field extraction
- CalendarCommandFromApiJsonDeserializer: Use Boolean.TRUE.equals() for
null-safe boolean comparison
- CalendarCommand: Update field type and constructor parameter from
boolean to Boolean to support null values
This addresses the FIXME comments on lines 156 and 298 in the original file.1 parent e294ce8 commit b4fa482
File tree
2 files changed
+7
-9
lines changed- fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar
- command
- serialization
2 files changed
+7
-9
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
Lines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
| 156 | + | |
158 | 157 | | |
159 | 158 | | |
160 | | - | |
| 159 | + | |
161 | 160 | | |
162 | 161 | | |
163 | 162 | | |
| |||
295 | 294 | | |
296 | 295 | | |
297 | 296 | | |
298 | | - | |
299 | | - | |
| 297 | + | |
300 | 298 | | |
301 | 299 | | |
302 | | - | |
| 300 | + | |
303 | 301 | | |
304 | 302 | | |
305 | 303 | | |
| |||
0 commit comments