Bump Checkstyle to 8.21 (#7826)

This commit is contained in:
Fokko Driesprong 2019-06-04 10:02:46 +02:00 committed by Gian Merlino
parent fdc03bd336
commit f2b00023f8
3 changed files with 5 additions and 6 deletions

View File

@ -40,7 +40,8 @@ public final class CloseableUtils
public static void closeBoth(Closeable first, Closeable second) throws IOException
{
//noinspection EmptyTryBlock
try (Closeable ignore1 = second; Closeable ignore2 = first) {
try (Closeable ignore1 = second;
Closeable ignore2 = first) {
// piggy-back try-with-resources semantics
}
}

View File

@ -996,7 +996,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.20</version>
<version>8.21</version>
</dependency>
</dependencies>
<executions>

View File

@ -23,9 +23,9 @@ import com.google.common.collect.Sets;
import org.apache.druid.java.util.common.lifecycle.LifecycleStop;
import org.apache.druid.java.util.common.logger.Logger;
import org.apache.druid.java.util.emitter.service.ServiceEmitter;
import org.apache.druid.utils.CloseableUtils;
import javax.annotation.Nullable;
import java.io.Closeable;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
@ -156,9 +156,7 @@ public class HybridCache implements Cache
@LifecycleStop
public void close() throws IOException
{
try (Closeable closeable1 = level1; Closeable closeable2 = level2) {
// Just for closing
}
CloseableUtils.closeBoth(level1, level2);
}
@Override