fix - suppress warnings

This commit is contained in:
mindwind
2013-06-29 12:58:25 +08:00
parent 62c30dfe8b
commit 20a75417cd

View File

@@ -2891,7 +2891,8 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
*
* @return
*/
public List<Map<String, String>> sentinelMasters() {
@SuppressWarnings("rawtypes")
public List<Map<String, String>> sentinelMasters() {
client.sentinel(Protocol.SENTINEL_MASTERS);
final List<Object> reply = client.getObjectMultiBulkReply();
@@ -2968,7 +2969,8 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
* @param masterName
* @return
*/
public List<Map<String, String>> sentinelSlaves(String masterName) {
@SuppressWarnings("rawtypes")
public List<Map<String, String>> sentinelSlaves(String masterName) {
client.sentinel(Protocol.SENTINEL_SLAVES, masterName);
final List<Object> reply = client.getObjectMultiBulkReply();
@@ -2991,11 +2993,13 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
*
* @return Long followed by the String (runid)
*/
public List<? extends Object> sentinelIsMasterDownByAddr(String host,
@SuppressWarnings("unchecked")
public List<? extends Object> sentinelIsMasterDownByAddr(String host,
int port) {
client.sentinel(Protocol.SENTINEL_IS_MASTER_DOWN_BY_ADDR, host, port);
final List<Object> reply = client.getObjectMultiBulkReply();
return Arrays.asList(BuilderFactory.LONG.build(reply.get(0)),
BuilderFactory.STRING.build(reply.get(1)));
}
}