Fix some broken U tests (there are stille broken tests, working on it)

This commit is contained in:
Yaourt
2010-11-04 18:55:00 +01:00
parent abd464f9bd
commit ead39394a1
7 changed files with 86 additions and 7 deletions

View File

@@ -34,7 +34,7 @@ public class Client extends BinaryClient {
}
public void type(final String key) {
del(key.getBytes(Protocol.UTF8));
type(key.getBytes(Protocol.UTF8));
}
public void keys(final String pattern) {

View File

@@ -79,7 +79,7 @@ public class Connection {
} catch (IOException e) {
throw new JedisException("Could not connect to redis-server", e);
}
protocol.sendCommand(outputStream, cmd, (byte[])null);
protocol.sendCommand(outputStream, cmd, new byte[0][]);
pipelinedCommands++;
return this;
}
@@ -144,7 +144,12 @@ public class Connection {
}
public String getBulkReply() {
return new String(getBinaryBulkReply(), Protocol.UTF8);
final byte[] result = getBinaryBulkReply();
if (null != result) {
return new String(result, Protocol.UTF8);
} else {
return null;
}
}
public byte[] getBinaryBulkReply() {