[2/9] hbase git commit: HBASE-19811 Fix findbugs and error-prone warnings in hbase-server (branch-2)

2018-01-22 Thread stack
http://git-wip-us.apache.org/repos/asf/hbase/blob/93a182f2/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java
index 6b4d4b5..01d871c 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java
@@ -82,6 +82,7 @@ public class TestVisibilityLabelsWithDefaultVisLabelService 
extends TestVisibili
   public void testAddLabels() throws Throwable {
 PrivilegedExceptionAction action =
 new PrivilegedExceptionAction() {
+  @Override
   public VisibilityLabelsResponse run() throws Exception {
 String[] labels = { "L1", SECRET, "L2", "invalid~", "L3" };
 VisibilityLabelsResponse response = null;
@@ -122,6 +123,7 @@ public class TestVisibilityLabelsWithDefaultVisLabelService 
extends TestVisibili
 do {
   PrivilegedExceptionAction action =
   new PrivilegedExceptionAction() {
+@Override
 public VisibilityLabelsResponse run() throws Exception {
   String[] labels = { SECRET, CONFIDENTIAL, PRIVATE, "ABC", "XYZ" };
   try (Connection conn = ConnectionFactory.createConnection(conf)) {
@@ -170,6 +172,7 @@ public class TestVisibilityLabelsWithDefaultVisLabelService 
extends TestVisibili
   public void testListLabels() throws Throwable {
 PrivilegedExceptionAction action =
 new PrivilegedExceptionAction() {
+  @Override
   public ListLabelsResponse run() throws Exception {
 ListLabelsResponse response = null;
 try (Connection conn = ConnectionFactory.createConnection(conf)) {
@@ -200,6 +203,7 @@ public class TestVisibilityLabelsWithDefaultVisLabelService 
extends TestVisibili
   public void testListLabelsWithRegEx() throws Throwable {
 PrivilegedExceptionAction action =
 new PrivilegedExceptionAction() {
+  @Override
   public ListLabelsResponse run() throws Exception {
 ListLabelsResponse response = null;
 try (Connection conn = ConnectionFactory.createConnection(conf)) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/93a182f2/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDeletes.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDeletes.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDeletes.java
index e8aa0e7..844c67b 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDeletes.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDeletes.java
@@ -17,6 +17,17 @@
  */
 package org.apache.hadoop.hbase.security.visibility;
 
+import static 
org.apache.hadoop.hbase.security.visibility.VisibilityConstants.LABELS_TABLE_NAME;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.io.InterruptedIOException;
+import java.security.PrivilegedExceptionAction;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellScanner;
@@ -42,14 +53,10 @@ import org.apache.hadoop.hbase.security.User;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.testclassification.SecurityTests;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.hbase.util.DefaultEnvironmentEdge;
-import org.apache.hadoop.hbase.util.EnvironmentEdge;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
-import org.apache.hadoop.hbase.util.Threads;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -57,17 +64,6 @@ import org.junit.rules.TestName;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.security.PrivilegedExceptionAction;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import static 
org.apache.hadoop.hbase.security.visibility.VisibilityConstants.LABELS_TABLE_NAME;
-import static org.junit.Ass

[2/9] hbase git commit: HBASE-19811 Fix findbugs and error-prone warnings in hbase-server (branch-2)

2018-01-22 Thread stack
http://git-wip-us.apache.org/repos/asf/hbase/blob/b1269ec5/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java
index 189b37f..2adcf9e 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java
@@ -82,6 +82,7 @@ public class TestVisibilityLabelsWithDefaultVisLabelService 
extends TestVisibili
   public void testAddLabels() throws Throwable {
 PrivilegedExceptionAction action =
 new PrivilegedExceptionAction() {
+  @Override
   public VisibilityLabelsResponse run() throws Exception {
 String[] labels = { "L1", SECRET, "L2", "invalid~", "L3" };
 VisibilityLabelsResponse response = null;
@@ -122,6 +123,7 @@ public class TestVisibilityLabelsWithDefaultVisLabelService 
extends TestVisibili
 do {
   PrivilegedExceptionAction action =
   new PrivilegedExceptionAction() {
+@Override
 public VisibilityLabelsResponse run() throws Exception {
   String[] labels = { SECRET, CONFIDENTIAL, PRIVATE, "ABC", "XYZ" };
   try (Connection conn = ConnectionFactory.createConnection(conf)) {
@@ -170,6 +172,7 @@ public class TestVisibilityLabelsWithDefaultVisLabelService 
extends TestVisibili
   public void testListLabels() throws Throwable {
 PrivilegedExceptionAction action =
 new PrivilegedExceptionAction() {
+  @Override
   public ListLabelsResponse run() throws Exception {
 ListLabelsResponse response = null;
 try (Connection conn = ConnectionFactory.createConnection(conf)) {
@@ -200,6 +203,7 @@ public class TestVisibilityLabelsWithDefaultVisLabelService 
extends TestVisibili
   public void testListLabelsWithRegEx() throws Throwable {
 PrivilegedExceptionAction action =
 new PrivilegedExceptionAction() {
+  @Override
   public ListLabelsResponse run() throws Exception {
 ListLabelsResponse response = null;
 try (Connection conn = ConnectionFactory.createConnection(conf)) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b1269ec5/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDeletes.java
--
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDeletes.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDeletes.java
index 0a7d918..9d536fe 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDeletes.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDeletes.java
@@ -17,6 +17,17 @@
  */
 package org.apache.hadoop.hbase.security.visibility;
 
+import static 
org.apache.hadoop.hbase.security.visibility.VisibilityConstants.LABELS_TABLE_NAME;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.io.InterruptedIOException;
+import java.security.PrivilegedExceptionAction;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellScanner;
@@ -42,14 +53,10 @@ import org.apache.hadoop.hbase.security.User;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.testclassification.SecurityTests;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.hbase.util.DefaultEnvironmentEdge;
-import org.apache.hadoop.hbase.util.EnvironmentEdge;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
-import org.apache.hadoop.hbase.util.Threads;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -57,17 +64,6 @@ import org.junit.rules.TestName;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.security.PrivilegedExceptionAction;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import static 
org.apache.hadoop.hbase.security.visibility.VisibilityConstants.LABELS_TABLE_NAME;
-import static org.junit.Ass