Fix indentation (code formatting...)

This commit is contained in:
Jungtaek Lim
2014-08-08 10:56:39 +09:00
parent 1877185153
commit 514144d472
7 changed files with 67 additions and 68 deletions

View File

@@ -231,42 +231,42 @@ public class Connection implements Closeable {
}
public Object getOne() {
flush();
return readProtocolWithCheckingBroken();
flush();
return readProtocolWithCheckingBroken();
}
public boolean isBroken() {
return broken;
return broken;
}
protected void flush() {
try {
outputStream.flush();
} catch (IOException ex) {
broken = true;
throw new JedisConnectionException(ex);
}
try {
outputStream.flush();
} catch (IOException ex) {
broken = true;
throw new JedisConnectionException(ex);
}
}
protected Object readProtocolWithCheckingBroken() {
try {
return Protocol.read(inputStream);
} catch (JedisConnectionException exc) {
broken = true;
throw exc;
}
try {
return Protocol.read(inputStream);
} catch (JedisConnectionException exc) {
broken = true;
throw exc;
}
}
public List<Object> getMany(int count) {
flush();
List<Object> responses = new ArrayList<Object>();
for (int i = 0 ; i < count ; i++) {
try {
responses.add(readProtocolWithCheckingBroken());
} catch (JedisDataException e) {
responses.add(e);
}
}
return responses;
flush();
List<Object> responses = new ArrayList<Object>();
for (int i = 0; i < count; i++) {
try {
responses.add(readProtocolWithCheckingBroken());
} catch (JedisDataException e) {
responses.add(e);
}
}
return responses;
}
}