Commit bda262f
committed
refactor: drop @Suppress("ReturnCount") via 2-return form
Detekt's ReturnCount rule defaults to a max of 2; the previous body had
3 (early null/type guard, divergence guard, final result) which forced
the suppression. Collapse the divergence branch into a trailing
`return if (divergent) ... else null` expression so the function uses
exactly two `return` keywords:
1. early `return null` for the cache miss / non-push guard
2. final `return if (divergent) { ... } else { null }`
No behavior change. Addresses review feedback on #2636.
Refs: SDK-44741 parent 147baad commit bda262f
1 file changed
Lines changed: 21 additions & 21 deletions
File tree
- OneSignalSDK/onesignal/core/src/main/java/com/onesignal/user/internal/operations/impl/executors
Lines changed: 21 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | 210 | | |
212 | 211 | | |
213 | 212 | | |
| |||
220 | 219 | | |
221 | 220 | | |
222 | 221 | | |
223 | | - | |
224 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
225 | 243 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| |||
0 commit comments