This is an automated email from the ASF dual-hosted git repository. gian pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-druid.git
The following commit(s) were added to refs/heads/master by this push: new f2b0002 Bump Checkstyle to 8.21 (#7826) f2b0002 is described below commit f2b00023f83e070ac0682742124130f7c9ad26d8 Author: Fokko Driesprong <fo...@apache.org> AuthorDate: Tue Jun 4 10:02:46 2019 +0200 Bump Checkstyle to 8.21 (#7826) --- core/src/main/java/org/apache/druid/utils/CloseableUtils.java | 3 ++- pom.xml | 2 +- server/src/main/java/org/apache/druid/client/cache/HybridCache.java | 6 ++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/org/apache/druid/utils/CloseableUtils.java b/core/src/main/java/org/apache/druid/utils/CloseableUtils.java index cb62261..768abbe 100644 --- a/core/src/main/java/org/apache/druid/utils/CloseableUtils.java +++ b/core/src/main/java/org/apache/druid/utils/CloseableUtils.java @@ -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 } } diff --git a/pom.xml b/pom.xml index 904ddc2..e7ad47a 100644 --- a/pom.xml +++ b/pom.xml @@ -996,7 +996,7 @@ <dependency> <groupId>com.puppycrawl.tools</groupId> <artifactId>checkstyle</artifactId> - <version>8.20</version> + <version>8.21</version> </dependency> </dependencies> <executions> diff --git a/server/src/main/java/org/apache/druid/client/cache/HybridCache.java b/server/src/main/java/org/apache/druid/client/cache/HybridCache.java index fcd211a..65bf957 100644 --- a/server/src/main/java/org/apache/druid/client/cache/HybridCache.java +++ b/server/src/main/java/org/apache/druid/client/cache/HybridCache.java @@ -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 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org