This is an automated email from the ASF dual-hosted git repository. jiangtian pushed a commit to branch fix_49 in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
commit 7c912744e86880bf497bd2e16e1c15fdbcfb4cb0 Author: 江天 <[email protected]> AuthorDate: Fri Mar 15 18:46:45 2019 +0800 Remove 2 unneeded logs. --- .../java/org/apache/iotdb/db/concurrent/HashLock.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/iotdb/src/main/java/org/apache/iotdb/db/concurrent/HashLock.java b/iotdb/src/main/java/org/apache/iotdb/db/concurrent/HashLock.java index e725b54..80fd8e7 100644 --- a/iotdb/src/main/java/org/apache/iotdb/db/concurrent/HashLock.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/concurrent/HashLock.java @@ -18,9 +18,6 @@ */ package org.apache.iotdb.db.concurrent; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.util.concurrent.locks.ReentrantReadWriteLock; /** @@ -30,8 +27,6 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; */ public class HashLock { - private static final Logger LOGGER = LoggerFactory.getLogger(HashLock.class); - private static final int DEFAULT_LOCK_NUM = 100; private ReentrantReadWriteLock[] locks; @@ -67,18 +62,21 @@ public class HashLock { /** * This method will unlock all locks. Only for test convenience. + * + * The exceptions are ignored because they do not provide any useful information. */ + @SuppressWarnings("squid:S1166") public void reset() { for (int i = 0; i < lockSize; i++) { try { locks[i].readLock().unlock(); - } catch (Exception e) { - LOGGER.debug("Cannot unlock because, ", e); + } catch (Exception ignored) { + // not useful exception } try { locks[i].writeLock().unlock(); - } catch (Exception e) { - LOGGER.debug("Cannot unlock because, ", e); + } catch (Exception ignored) { + // not useful exception } } }
