Commit 3a48bdc
committed
@GenIgnore non-canonical getters/setters of Redis[Connect]Options.endpoints
The `RedisOptions` class has a field `endpoints` of type `List<String>`
for which multiple accessors and mutators exist:
- `getEndpoints()`: the canonical getter
- `setEndpoints()`: the canonical setter
- `getEndpoint()`: returns the first element of the list
- `setEndpoint()`: turns the list into a single-element list
- `addEndpoint()`: adds one element to the list
- `setConnectionString()`: same as `setEndpoint()`
- `addConnectionString()`: same as `addEndpoint()`
The `RedisConnectOptions` class, which is `public` but is only used internally,
has the same problem.
All these methods are treated as individual properties by the code generator
that produces the JSON serialization/deserialization classes, even though
they are all backed by a single field. Since the code generator considers
properties in declaration order (in upcoming Vert.x 5; it is lexicographic
order in Vert.x 4), we had to reorder the methods so that serialization
and deserialization does not lose information.
That is arguably a provisional solution, as it is very much not obvious that
declaration order matters. This commit provides a permanent solution: all
the non-canonical methods are marked as `@GenIgnore`. Only the `getEndpoints()`
and `setEndpoints()` methods are used for serialization/deserialization.
This is a breaking change, so it shall not be backported to Vert.x 4 and
shall be documented as such.1 parent 6730109 commit 3a48bdc
File tree
4 files changed
+9
-39
lines changed- src/main
- generated/io/vertx/redis/client
- java/io/vertx/redis/client
4 files changed
+9
-39
lines changedLines changed: 0 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | 43 | | |
59 | 44 | | |
60 | 45 | | |
| |||
87 | 72 | | |
88 | 73 | | |
89 | 74 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 75 | | |
94 | 76 | | |
95 | 77 | | |
| |||
Lines changed: 0 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 33 | | |
39 | 34 | | |
40 | 35 | | |
| |||
45 | 40 | | |
46 | 41 | | |
47 | 42 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 43 | | |
62 | 44 | | |
63 | 45 | | |
| |||
148 | 130 | | |
149 | 131 | | |
150 | 132 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | 133 | | |
155 | 134 | | |
156 | 135 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| 162 | + | |
161 | 163 | | |
162 | 164 | | |
163 | 165 | | |
| |||
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
| 197 | + | |
194 | 198 | | |
195 | 199 | | |
196 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| 174 | + | |
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
| |||
187 | 189 | | |
188 | 190 | | |
189 | 191 | | |
| 192 | + | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
| |||
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
| 212 | + | |
209 | 213 | | |
210 | 214 | | |
211 | 215 | | |
| |||
222 | 226 | | |
223 | 227 | | |
224 | 228 | | |
| 229 | + | |
225 | 230 | | |
226 | 231 | | |
227 | 232 | | |
| |||
0 commit comments