vertx-redis-client
vertx-redis-client copied to clipboard
Fix initialization of RedisOptions and Redis[*]ConnectOptions
This commit makes sure that:
- all mandatory fields of
RedisOptionsare initialized (initializing them only inRedis[*]ConnectOptionsis not enough due to the usage of copy constructors); - all constructors of subclasses of
RedisConnectOptionsproperly delegate to the corresponding superclass constructors; - the
JsonObject-accepting constructors of subclasses ofRedisConnectOptionscall the correct conversion function, after delegating to the corresponding superclass constructor, which calls its own conversion function.
should we have tests for this @Ladicek ?
Good point! Let me figure out some tests for this.
Added tests. Thanks for insisting on it, I actually discovered a few more subtle bugs -- most importantly, the JSON serialization/deserialization used to get/set the endpoints list multiple times, due to the existence of multiple getter/setter pairs, and that could actually lead to loss of information.
thank you @Ladicek