Github user kl0u commented on a diff in the pull request:
https://github.com/apache/flink/pull/2245#discussion_r71379345
--- Diff:
flink-streaming-connectors/flink-connector-redis/src/main/java/org/apache/flink/streaming/connectors/redis/common/container/RedisContainer.java
---
@@ -68,12 +68,12 @@ public RedisContainer(final JedisSentinelPool
sentinelPool) {
*/
@Override
public void close() throws IOException {
- if (this.jedisPool != null) {
- this.jedisPool.close();
- }
- if (this.jedisSentinelPool != null) {
- this.jedisSentinelPool.close();
- }
+ getInstance().close();
--- End diff --
Yes because from the constructors, only one of the `jedisSentinelPool` or
`jedisPool` can be non-null value and that is what `getInstance()` returns.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---