From 3f9243d283f91c83b068a2ebb6d8b0e71bb5d103 Mon Sep 17 00:00:00 2001 From: Istvan Toth Date: Mon, 15 Jul 2024 13:25:11 +0200 Subject: [PATCH] fix moar warnings --- .../java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java | 2 +- .../org/apache/hadoop/hbase/rest/client/TestRemoteTable.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java index 5e7ef436a565..21796e711df6 100644 --- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java +++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java @@ -356,7 +356,7 @@ private Result[] getResults(String spec) throws IOException { public boolean exists(Get get) throws IOException { LOG.warn("exists() is really get(), just use get()"); Result result = get(get); - return result != null && !(result.isEmpty()); + return result != null && !result.isEmpty(); } @Override diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteTable.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteTable.java index dc08eade6fd3..ae92abbde3f8 100644 --- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteTable.java +++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteTable.java @@ -629,7 +629,7 @@ public void testLongLivedScan() throws Exception { REST_TEST_UTIL.shutdownServletContainer(); // Set the ConnectionCache timeout to trigger halfway through the trials - TEST_UTIL.getConfiguration().setLong(RESTServlet.MAX_IDLETIME, (numTrials / 2l) * trialPause); + TEST_UTIL.getConfiguration().setLong(RESTServlet.MAX_IDLETIME, (numTrials / 2L) * trialPause); TEST_UTIL.getConfiguration().setLong(RESTServlet.CLEANUP_INTERVAL, cleanUpInterval); // Start the Rest Servlet container