Commit 6b4f989
committed
refactor(liveobjects): delegate no-arg counter mutators to their Number overloads
The parameterless increment()/decrement() on both DefaultLiveCounterPathObject and
DefaultLiveCounterInstance duplicated the full body of their Number counterparts with
a hardcoded 1. Make them delegate to increment(1)/decrement(1) instead. All spec
checks live in the parameterized overload, and the default-of-1 spec points
(RTPO17a1/RTPO18a1, RTINS14a1/RTINS15a1) are preserved on the delegating methods.
Pure refactor, no behaviour change.1 parent 4a939ca commit 6b4f989
2 files changed
Lines changed: 8 additions & 24 deletions
File tree
- liveobjects/src/main/kotlin/io/ably/lib/liveobjects
- instance/types
- path/types
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 39 | + | |
| 40 | + | |
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 47 | + | |
| 48 | + | |
53 | 49 | | |
54 | 50 | | |
55 | 51 | | |
| |||
Lines changed: 4 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 30 | + | |
| 31 | + | |
38 | 32 | | |
39 | 33 | | |
40 | 34 | | |
| |||
45 | 39 | | |
46 | 40 | | |
47 | 41 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 42 | + | |
| 43 | + | |
56 | 44 | | |
57 | 45 | | |
58 | 46 | | |
| |||
0 commit comments