From 4abc602e3b3e7ce1f51b5ceb72272ea2d733ec97 Mon Sep 17 00:00:00 2001 From: Sean Mackrory Date: Sat, 28 May 2016 15:31:17 -0600 Subject: [PATCH] HBASE-15912. REST module has 2 extent warnings in findbugs. ScannerResource defines a variable params the is never used. TableResource catches Exception when IOException is thrown. --- .../java/org/apache/hadoop/hbase/rest/ScannerResource.java | 1 - .../main/java/org/apache/hadoop/hbase/rest/TableResource.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/ScannerResource.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/ScannerResource.java index 6c424ce5327..844ea3b537e 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/ScannerResource.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/ScannerResource.java @@ -91,7 +91,6 @@ public class ScannerResource extends ResourceBase { spec = new RowSpec(model.getStartRow(), endRow, model.getColumns(), model.getStartTime(), model.getEndTime(), model.getMaxVersions()); } - MultivaluedMap params = uriInfo.getQueryParameters(); try { Filter filter = ScannerResultGenerator.buildFilterFromModel(model); diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/TableResource.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/TableResource.java index f87ef7ee54a..45e9125863e 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/TableResource.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/TableResource.java @@ -192,8 +192,8 @@ public class TableResource extends ResourceBase { } int fetchSize = this.servlet.getConfiguration().getInt(Constants.SCAN_FETCH_SIZE, 10); tableScan.setCaching(fetchSize); - return new TableScanResource(hTable.getScanner(tableScan), userRequestedLimit); - } catch (Exception exp) { + return new TableScanResource(hTable.getScanner(tableScan), userRequestedLimit); + } catch (IOException exp) { servlet.getMetrics().incrementFailedScanRequests(1); processException(exp); LOG.warn(exp);