HDDS-1447. Fix CheckStyle warnings. Contributed by Wanqiang Ji.

This commit is contained in:
Márton Elek 2019-04-18 08:41:26 +02:00
parent 8aea5e4cb6
commit b979fdde99
No known key found for this signature in database
GPG Key ID: D51EA8F00EE79B28
2 changed files with 7 additions and 6 deletions

View File

@ -316,8 +316,8 @@ private void handleWrite(byte[] b, int off, long len, boolean retry)
BlockOutputStreamEntry current = streamEntries.get(currentStreamIndex);
// length(len) will be in int range if the call is happening through
// write API of blockOutputStream. Length can be in long range if it comes
// via Exception path.
// write API of blockOutputStream. Length can be in long range if it
// comes via Exception path.
int writeLen = Math.min((int) len, (int) current.getRemaining());
long currentPos = current.getWrittenDataLength();
try {
@ -619,8 +619,8 @@ private void handleFlushOrClose(StreamAction op) throws IOException {
try {
Collection<DatanodeDetails> failedServers =
entry.getFailedServers();
// failed servers can be null in case there is no data written in the
// stream
// failed servers can be null in case there is no data written in
// the stream
if (failedServers != null && !failedServers.isEmpty()) {
excludeList.addDatanodes(failedServers);
}

View File

@ -728,8 +728,9 @@ public static void waitForContainerClose(OzoneOutputStream outputStream,
List<Long> containerIdList = new ArrayList<>();
for (OmKeyLocationInfo info : locationInfoList) {
long id = info.getContainerID();
if (!containerIdList.contains(id))
containerIdList.add(id);
if (!containerIdList.contains(id)) {
containerIdList.add(id);
}
}
Assert.assertTrue(!containerIdList.isEmpty());
waitForContainerClose(cluster, containerIdList.toArray(new Long[0]));