Skip to content

Commit 1013d8d

Browse files
jonlockwoodmalafeev
authored andcommitted
Fixed issue with exists(keys), unlink, and touch (opentracing-contrib#51)
Issue found with versions 0.1.2 through 0.1.15-SNAPSHOT of this class where the expected functionality of exists(keys), unlink(keys), and touch(keys) are not met. In early versions, no error would be found, and in newer versions, sometimes and error would be found if empty keys were not allowed.
1 parent 6a85f18 commit 1013d8d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

opentracing-redis-spring-data2/src/main/java/io/opentracing/contrib/redis/spring/data2/connection/TracingRedisConnection.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public Boolean exists(byte[] key) {
185185

186186
@Override
187187
public Long exists(byte[]... keys) {
188-
return helper.doInScope(RedisCommand.EXISTS, keys, connection::exists);
188+
return helper.doInScope(RedisCommand.EXISTS, keys, () -> connection.exists(keys));
189189
}
190190

191191
@Override
@@ -195,7 +195,7 @@ public Long del(byte[]... keys) {
195195

196196
@Override
197197
public Long unlink(byte[]... keys) {
198-
return helper.doInScope(RedisCommand.UNLINK, keys, connection::unlink);
198+
return helper.doInScope(RedisCommand.UNLINK, keys, () -> connection.unlink(keys));
199199
}
200200

201201
@Override
@@ -205,7 +205,7 @@ public DataType type(byte[] key) {
205205

206206
@Override
207207
public Long touch(byte[]... keys) {
208-
return helper.doInScope(RedisCommand.TOUCH, keys, connection::touch);
208+
return helper.doInScope(RedisCommand.TOUCH, keys, () -> connection.touch(keys));
209209
}
210210

211211
@Override

0 commit comments

Comments
 (0)