From 3d4f62f5b797b78c90b372f166bdc1bc4bbf345e Mon Sep 17 00:00:00 2001 From: Thomas Darimont Date: Tue, 12 May 2015 16:09:00 +0200 Subject: [PATCH] DATAREDIS-396 - Update Jedis driver to version 2.7.2. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adapted sendCommand lookup in JedisConnection to honor the changed signature of redis.clients.jedis.Connection.sendCommand(Command, String…) to redis.clients.jedis.Connection.sendCommand(ProtocolCommand, String…). Original pull request: #140. --- gradle.properties | 2 +- .../data/redis/connection/jedis/JedisConnection.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index b7e4f053f..bcf3e6322 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ slf4jVersion=1.7.10 junitVersion=4.12 jredisVersion=06052013 -jedisVersion=2.7.0 +jedisVersion=2.7.2 springVersion=4.1.6.RELEASE springDataBuildVersion=1.7.0.BUILD-SNAPSHOT log4jVersion=1.2.17 diff --git a/src/main/java/org/springframework/data/redis/connection/jedis/JedisConnection.java b/src/main/java/org/springframework/data/redis/connection/jedis/JedisConnection.java index 0ee2cb8a5..73c2b125a 100644 --- a/src/main/java/org/springframework/data/redis/connection/jedis/JedisConnection.java +++ b/src/main/java/org/springframework/data/redis/connection/jedis/JedisConnection.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2014 the original author or authors. + * Copyright 2011-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,6 +68,7 @@ import redis.clients.jedis.Jedis; import redis.clients.jedis.Pipeline; import redis.clients.jedis.Protocol; import redis.clients.jedis.Protocol.Command; +import redis.clients.jedis.ProtocolCommand; import redis.clients.jedis.Queable; import redis.clients.jedis.Response; import redis.clients.jedis.ScanParams; @@ -102,8 +103,8 @@ public class JedisConnection extends AbstractRedisConnection { static { CLIENT_FIELD = ReflectionUtils.findField(BinaryJedis.class, "client", Client.class); - ReflectionUtils.makeAccessible(CLIENT_FIELD); - SEND_COMMAND = ReflectionUtils.findMethod(Connection.class, "sendCommand", new Class[] { Command.class, + ReflectionUtils.makeAccessible(CLIENT_FIELD); + SEND_COMMAND = ReflectionUtils.findMethod(Connection.class, "sendCommand", new Class[] { ProtocolCommand.class, byte[][].class }); ReflectionUtils.makeAccessible(SEND_COMMAND); GET_RESPONSE = ReflectionUtils.findMethod(Queable.class, "getResponse", Builder.class);