hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [17/22] hbase git commit: HBASE-17532 Replaced explicit type with diamond operator
Date Tue, 07 Mar 2017 19:23:30 GMT
http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
index 1841aa4..4712c30 100644
--- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
+++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
@@ -125,7 +125,7 @@ public class WALProcedureStore extends ProcedureStoreBase {
   private final FileSystem fs;
   private final Path walDir;
 
-  private final AtomicReference<Throwable> syncException = new AtomicReference<Throwable>();
+  private final AtomicReference<Throwable> syncException = new AtomicReference<>();
   private final AtomicBoolean loading = new AtomicBoolean(true);
   private final AtomicBoolean inSync = new AtomicBoolean(false);
   private final AtomicLong totalSynced = new AtomicLong(0);
@@ -304,7 +304,7 @@ public class WALProcedureStore extends ProcedureStoreBase {
   public ArrayList<ProcedureWALFile> getActiveLogs() {
     lock.lock();
     try {
-      return new ArrayList<ProcedureWALFile>(logs);
+      return new ArrayList<>(logs);
     } finally {
       lock.unlock();
     }
@@ -395,7 +395,7 @@ public class WALProcedureStore extends ProcedureStoreBase {
         @Override
         public void markCorruptedWAL(ProcedureWALFile log, IOException e) {
           if (corruptedLogs == null) {
-            corruptedLogs = new HashSet<ProcedureWALFile>();
+            corruptedLogs = new HashSet<>();
           }
           corruptedLogs.add(log);
           // TODO: sideline corrupted log
@@ -790,7 +790,7 @@ public class WALProcedureStore extends ProcedureStoreBase {
   public ArrayList<SyncMetrics> getSyncMetrics() {
     lock.lock();
     try {
-      return new ArrayList<SyncMetrics>(syncMetricsBuffer);
+      return new ArrayList<>(syncMetricsBuffer);
     } finally {
       lock.unlock();
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/ProcedureTestingUtility.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/ProcedureTestingUtility.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/ProcedureTestingUtility.java
index c1b4e9b..226666f 100644
--- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/ProcedureTestingUtility.java
+++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/ProcedureTestingUtility.java
@@ -183,7 +183,7 @@ public class ProcedureTestingUtility {
   public static <TEnv> long submitAndWait(Configuration conf, TEnv env, Procedure<TEnv> proc)
       throws IOException {
     NoopProcedureStore procStore = new NoopProcedureStore();
-    ProcedureExecutor<TEnv> procExecutor = new ProcedureExecutor<TEnv>(conf, env, procStore);
+    ProcedureExecutor<TEnv> procExecutor = new ProcedureExecutor<>(conf, env, procStore);
     procStore.start(1);
     procExecutor.start(1, false);
     try {
@@ -446,9 +446,9 @@ public class ProcedureTestingUtility {
   }
 
   public static class LoadCounter implements ProcedureStore.ProcedureLoader {
-    private final ArrayList<Procedure> corrupted = new ArrayList<Procedure>();
-    private final ArrayList<ProcedureInfo> completed = new ArrayList<ProcedureInfo>();
-    private final ArrayList<Procedure> runnable = new ArrayList<Procedure>();
+    private final ArrayList<Procedure> corrupted = new ArrayList<>();
+    private final ArrayList<ProcedureInfo> completed = new ArrayList<>();
+    private final ArrayList<Procedure> runnable = new ArrayList<>();
 
     private Set<Long> procIds;
     private long maxProcId = 0;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureExecution.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureExecution.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureExecution.java
index da6d960..38adbf5 100644
--- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureExecution.java
+++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureExecution.java
@@ -129,7 +129,7 @@ public class TestProcedureExecution {
 
   @Test(timeout=30000)
   public void testBadSubprocList() {
-    List<String> state = new ArrayList<String>();
+    List<String> state = new ArrayList<>();
     Procedure subProc2 = new TestSequentialProcedure("subProc2", state);
     Procedure subProc1 = new TestSequentialProcedure("subProc1", state, subProc2, NULL_PROC);
     Procedure rootProc = new TestSequentialProcedure("rootProc", state, subProc1);
@@ -151,7 +151,7 @@ public class TestProcedureExecution {
 
   @Test(timeout=30000)
   public void testSingleSequentialProc() {
-    List<String> state = new ArrayList<String>();
+    List<String> state = new ArrayList<>();
     Procedure subProc2 = new TestSequentialProcedure("subProc2", state);
     Procedure subProc1 = new TestSequentialProcedure("subProc1", state, subProc2);
     Procedure rootProc = new TestSequentialProcedure("rootProc", state, subProc1);
@@ -166,7 +166,7 @@ public class TestProcedureExecution {
 
   @Test(timeout=30000)
   public void testSingleSequentialProcRollback() {
-    List<String> state = new ArrayList<String>();
+    List<String> state = new ArrayList<>();
     Procedure subProc2 = new TestSequentialProcedure("subProc2", state,
                                                      new TestProcedureException("fail test"));
     Procedure subProc1 = new TestSequentialProcedure("subProc1", state, subProc2);
@@ -295,7 +295,7 @@ public class TestProcedureExecution {
   @Test(timeout=30000)
   public void testAbortTimeout() {
     final int PROC_TIMEOUT_MSEC = 2500;
-    List<String> state = new ArrayList<String>();
+    List<String> state = new ArrayList<>();
     Procedure proc = new TestWaitingProcedure("wproc", state, false);
     proc.setTimeout(PROC_TIMEOUT_MSEC);
     long startTime = EnvironmentEdgeManager.currentTime();
@@ -313,7 +313,7 @@ public class TestProcedureExecution {
 
   @Test(timeout=30000)
   public void testAbortTimeoutWithChildren() {
-    List<String> state = new ArrayList<String>();
+    List<String> state = new ArrayList<>();
     Procedure proc = new TestWaitingProcedure("wproc", state, true);
     proc.setTimeout(2500);
     long rootId = ProcedureTestingUtility.submitAndWait(procExecutor, proc);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java
index f838c25..bd614e3 100644
--- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java
+++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java
@@ -154,7 +154,7 @@ public class TestProcedureReplayOrder {
   }
 
   private static class TestProcedureEnv {
-    private ArrayList<TestProcedure> execList = new ArrayList<TestProcedure>();
+    private ArrayList<TestProcedure> execList = new ArrayList<>();
     private AtomicLong execTimestamp = new AtomicLong(0);
 
     public long getExecId() {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSchedulerConcurrency.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSchedulerConcurrency.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSchedulerConcurrency.java
index b8cd8ff..4217693 100644
--- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSchedulerConcurrency.java
+++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSchedulerConcurrency.java
@@ -79,8 +79,7 @@ public class TestProcedureSchedulerConcurrency {
     final AtomicInteger waitCount = new AtomicInteger(0);
     final AtomicInteger wakeCount = new AtomicInteger(0);
 
-    final ConcurrentSkipListSet<TestProcedureWithEvent> waitQueue =
-      new ConcurrentSkipListSet<TestProcedureWithEvent>();
+    final ConcurrentSkipListSet<TestProcedureWithEvent> waitQueue = new ConcurrentSkipListSet<>();
     threads[0] = new Thread() {
       @Override
       public void run() {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSuspended.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSuspended.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSuspended.java
index ba89768..0146bc7 100644
--- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSuspended.java
+++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSuspended.java
@@ -161,7 +161,7 @@ public class TestProcedureSuspended {
   }
 
   public static class TestLockProcedure extends Procedure<TestProcEnv> {
-    private final ArrayList<Long> timestamps = new ArrayList<Long>();
+    private final ArrayList<Long> timestamps = new ArrayList<>();
     private final String key;
 
     private boolean triggerRollback = false;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestYieldProcedures.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestYieldProcedures.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestYieldProcedures.java
index 165179d..b1d0669 100644
--- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestYieldProcedures.java
+++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestYieldProcedures.java
@@ -204,7 +204,7 @@ public class TestYieldProcedures {
       public boolean isRollback() { return rollback; }
     }
 
-    private final ArrayList<ExecutionInfo> executionInfo = new ArrayList<ExecutionInfo>();
+    private final ArrayList<ExecutionInfo> executionInfo = new ArrayList<>();
     private final AtomicBoolean aborted = new AtomicBoolean(false);
     private final boolean throwInterruptOnceOnEachStep;
     private final boolean abortOnFinalStep;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/util/TestDelayedUtil.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/util/TestDelayedUtil.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/util/TestDelayedUtil.java
index 1e2db4d..a2cd70f 100644
--- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/util/TestDelayedUtil.java
+++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/util/TestDelayedUtil.java
@@ -36,13 +36,13 @@ public class TestDelayedUtil {
     Object o1 = new Object();
     Object o2 = new Object();
     ZeroDelayContainer<Long> lnull = new ZeroDelayContainer(null);
-    ZeroDelayContainer<Long> l10a = new ZeroDelayContainer<Long>(10L);
+    ZeroDelayContainer<Long> l10a = new ZeroDelayContainer<>(10L);
     ZeroDelayContainer<Long> l10b = new ZeroDelayContainer(10L);
     ZeroDelayContainer<Long> l15 = new ZeroDelayContainer(15L);
-    ZeroDelayContainer<Object> onull = new ZeroDelayContainer<Object>(null);
-    ZeroDelayContainer<Object> o1ca = new ZeroDelayContainer<Object>(o1);
-    ZeroDelayContainer<Object> o1cb = new ZeroDelayContainer<Object>(o1);
-    ZeroDelayContainer<Object> o2c = new ZeroDelayContainer<Object>(o2);
+    ZeroDelayContainer<Object> onull = new ZeroDelayContainer<>(null);
+    ZeroDelayContainer<Object> o1ca = new ZeroDelayContainer<>(o1);
+    ZeroDelayContainer<Object> o1cb = new ZeroDelayContainer<>(o1);
+    ZeroDelayContainer<Object> o2c = new ZeroDelayContainer<>(o2);
 
     ZeroDelayContainer[] items = new ZeroDelayContainer[] {
       lnull, l10a, l10b, l15, onull, o1ca, o1cb, o2c,

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/util/ForeignExceptionUtil.java
----------------------------------------------------------------------
diff --git a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/util/ForeignExceptionUtil.java b/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/util/ForeignExceptionUtil.java
index 0ccd9f9..28b3909 100644
--- a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/util/ForeignExceptionUtil.java
+++ b/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/util/ForeignExceptionUtil.java
@@ -108,7 +108,7 @@ public final class ForeignExceptionUtil {
     // if there is no stack trace, ignore it and just return the message
     if (trace == null) return null;
     // build the stack trace for the message
-    List<StackTraceElementMessage> pbTrace = new ArrayList<StackTraceElementMessage>(trace.length);
+    List<StackTraceElementMessage> pbTrace = new ArrayList<>(trace.length);
     for (StackTraceElement elem : trace) {
       StackTraceElementMessage.Builder stackBuilder = StackTraceElementMessage.newBuilder();
       stackBuilder.setDeclaringClass(elem.getClassName());

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java
index 4ab194c..ba646c2 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java
@@ -206,8 +206,7 @@ public class RESTServer implements Constants {
     }
 
     @SuppressWarnings("unchecked")
-    List<String> remainingArgs = commandLine != null ?
-        commandLine.getArgList() : new ArrayList<String>();
+    List<String> remainingArgs = commandLine != null ? commandLine.getArgList() : new ArrayList<>();
     if (remainingArgs.size() != 1) {
       printUsageAndExit(options, 1);
     }
@@ -256,7 +255,7 @@ public class RESTServer implements Constants {
     int queueSize = servlet.getConfiguration().getInt(REST_THREAD_POOL_TASK_QUEUE_SIZE, -1);
     int idleTimeout = servlet.getConfiguration().getInt(REST_THREAD_POOL_THREAD_IDLE_TIMEOUT, 60000);
     QueuedThreadPool threadPool = queueSize > 0 ?
-        new QueuedThreadPool(maxThreads, minThreads, idleTimeout, new ArrayBlockingQueue<Runnable>(queueSize)) :
+        new QueuedThreadPool(maxThreads, minThreads, idleTimeout, new ArrayBlockingQueue<>(queueSize)) :
         new QueuedThreadPool(maxThreads, minThreads, idleTimeout);
 
     Server server = new Server(threadPool);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java
index de84625..7be4190 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java
@@ -185,7 +185,7 @@ public class RowResource extends ResourceBase {
     Table table = null;
     try {
       List<RowModel> rows = model.getRows();
-      List<Put> puts = new ArrayList<Put>();
+      List<Put> puts = new ArrayList<>();
       for (RowModel row: rows) {
         byte[] key = row.getKey();
         if (key == null) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowSpec.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowSpec.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowSpec.java
index cc51c85..5d25c54 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowSpec.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowSpec.java
@@ -44,9 +44,8 @@ public class RowSpec {
   
   private byte[] row = HConstants.EMPTY_START_ROW;
   private byte[] endRow = null;
-  private TreeSet<byte[]> columns =
-    new TreeSet<byte[]>(Bytes.BYTES_COMPARATOR);
-  private List<String> labels = new ArrayList<String>();  
+  private TreeSet<byte[]> columns = new TreeSet<>(Bytes.BYTES_COMPARATOR);
+  private List<String> labels = new ArrayList<>();
   private long startTime = DEFAULT_START_TIMESTAMP;
   private long endTime = DEFAULT_END_TIMESTAMP;
   private int maxVersions = 1;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java
index 204f688..c9cf49a 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java
@@ -77,7 +77,7 @@ public class Client {
   private void initialize(Cluster cluster, boolean sslEnabled) {
     this.cluster = cluster;
     this.sslEnabled = sslEnabled;
-    extraHeaders = new ConcurrentHashMap<String, String>();
+    extraHeaders = new ConcurrentHashMap<>();
     String clspath = System.getProperty("java.class.path");
     LOG.debug("classpath " + clspath);
     this.httpClient = new DefaultHttpClient();

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
index 51a75d7..e762c31 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
@@ -173,9 +173,9 @@ public class RemoteHTable implements Table {
   }
 
   protected Result[] buildResultFromModel(final CellSetModel model) {
-    List<Result> results = new ArrayList<Result>();
+    List<Result> results = new ArrayList<>();
     for (RowModel row: model.getRows()) {
-      List<Cell> kvs = new ArrayList<Cell>(row.getCells().size());
+      List<Cell> kvs = new ArrayList<>(row.getCells().size());
       for (CellModel cell: row.getCells()) {
         byte[][] split = KeyValue.parseColumn(cell.getColumn());
         byte[] column = split[0];
@@ -425,13 +425,12 @@ public class RemoteHTable implements Table {
     // ignores the row specification in the URI
 
     // separate puts by row
-    TreeMap<byte[],List<Cell>> map =
-      new TreeMap<byte[],List<Cell>>(Bytes.BYTES_COMPARATOR);
+    TreeMap<byte[],List<Cell>> map = new TreeMap<>(Bytes.BYTES_COMPARATOR);
     for (Put put: puts) {
       byte[] row = put.getRow();
       List<Cell> cells = map.get(row);
       if (cells == null) {
-        cells = new ArrayList<Cell>();
+        cells = new ArrayList<>();
         map.put(row, cells);
       }
       for (List<Cell> l: put.getFamilyCellMap().values()) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/filter/GzipFilter.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/filter/GzipFilter.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/filter/GzipFilter.java
index 094ae0b..626e61f 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/filter/GzipFilter.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/filter/GzipFilter.java
@@ -40,7 +40,7 @@ import org.apache.hadoop.hbase.HBaseInterfaceAudience;
 
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CONFIG)
 public class GzipFilter implements Filter {
-  private Set<String> mimeTypes = new HashSet<String>();
+  private Set<String> mimeTypes = new HashSet<>();
 
   @Override
   public void init(FilterConfig filterConfig) throws ServletException {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/filter/RestCsrfPreventionFilter.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/filter/RestCsrfPreventionFilter.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/filter/RestCsrfPreventionFilter.java
index dbb1447..7224383 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/filter/RestCsrfPreventionFilter.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/filter/RestCsrfPreventionFilter.java
@@ -93,7 +93,7 @@ public class RestCsrfPreventionFilter implements Filter {
 
   void parseBrowserUserAgents(String userAgents) {
     String[] agentsArray =  userAgents.split(",");
-    browserUserAgents = new HashSet<Pattern>();
+    browserUserAgents = new HashSet<>();
     for (String patternString : agentsArray) {
       browserUserAgents.add(Pattern.compile(patternString));
     }
@@ -101,7 +101,7 @@ public class RestCsrfPreventionFilter implements Filter {
 
   void parseMethodsToIgnore(String mti) {
     String[] methods = mti.split(",");
-    methodsToIgnore = new HashSet<String>();
+    methodsToIgnore = new HashSet<>();
     for (int i = 0; i < methods.length; i++) {
       methodsToIgnore.add(methods[i]);
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/CellSetModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/CellSetModel.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/CellSetModel.java
index 8337ffc..a754fe4 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/CellSetModel.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/CellSetModel.java
@@ -84,7 +84,7 @@ public class CellSetModel implements Serializable, ProtobufMessageHandler {
    * Constructor
    */
   public CellSetModel() {
-    this.rows = new ArrayList<RowModel>();
+    this.rows = new ArrayList<>();
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/ColumnSchemaModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/ColumnSchemaModel.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/ColumnSchemaModel.java
index 8562cde..1b855fd 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/ColumnSchemaModel.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/ColumnSchemaModel.java
@@ -57,7 +57,7 @@ public class ColumnSchemaModel implements Serializable {
   private static QName VERSIONS = new QName(HConstants.VERSIONS);
 
   private String name;
-  private Map<QName,Object> attrs = new LinkedHashMap<QName,Object>();
+  private Map<QName,Object> attrs = new LinkedHashMap<>();
 
   /**
    * Default constructor

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesInstanceModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesInstanceModel.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesInstanceModel.java
index 0c5af3c..bcc1581 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesInstanceModel.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesInstanceModel.java
@@ -89,7 +89,7 @@ public class NamespacesInstanceModel implements Serializable, ProtobufMessageHan
     // For properly formed JSON, if no properties, field has to be null (not just no elements).
     if(nd.getConfiguration().isEmpty()){ return; }
 
-    properties = new HashMap<String,String>();
+    properties = new HashMap<>();
     properties.putAll(nd.getConfiguration());
   }
 
@@ -100,7 +100,7 @@ public class NamespacesInstanceModel implements Serializable, ProtobufMessageHan
    */
   public void addProperty(String key, String value) {
     if(properties == null){
-      properties = new HashMap<String,String>();
+      properties = new HashMap<>();
     }
     properties.put(key, value);
   }
@@ -110,7 +110,7 @@ public class NamespacesInstanceModel implements Serializable, ProtobufMessageHan
    */
   public Map<String,String> getProperties() {
     if(properties == null){
-      properties = new HashMap<String,String>();
+      properties = new HashMap<>();
     }
     return properties;
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesModel.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesModel.java
index aed80aa..4399b0b 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesModel.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesModel.java
@@ -52,7 +52,7 @@ public class NamespacesModel implements Serializable, ProtobufMessageHandler {
 
   @JsonProperty("Namespace")
   @XmlElement(name="Namespace")
-  private List<String> namespaces = new ArrayList<String>();
+  private List<String> namespaces = new ArrayList<>();
 
   /**
    * Default constructor. Do not use.
@@ -66,7 +66,7 @@ public class NamespacesModel implements Serializable, ProtobufMessageHandler {
    */
   public NamespacesModel(Admin admin) throws IOException {
     NamespaceDescriptor[] nds = admin.listNamespaceDescriptors();
-    namespaces = new ArrayList<String>(nds.length);
+    namespaces = new ArrayList<>(nds.length);
     for (NamespaceDescriptor nd : nds) {
       namespaces.add(nd.getName());
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/RowModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/RowModel.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/RowModel.java
index 398d5e1..663c838 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/RowModel.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/RowModel.java
@@ -64,7 +64,7 @@ public class RowModel implements ProtobufMessageHandler, Serializable {
 
   @JsonProperty("Cell")
   @XmlElement(name="Cell")
-  private List<CellModel> cells = new ArrayList<CellModel>();
+  private List<CellModel> cells = new ArrayList<>();
 
 
   /**
@@ -86,7 +86,7 @@ public class RowModel implements ProtobufMessageHandler, Serializable {
    */
   public RowModel(final byte[] key) {
     this.key = key;
-    cells = new ArrayList<CellModel>();
+    cells = new ArrayList<>();
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java
index 5c8d618..2098c3d 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java
@@ -109,14 +109,14 @@ public class ScannerModel implements ProtobufMessageHandler, Serializable {
 
   private byte[] startRow = HConstants.EMPTY_START_ROW;
   private byte[] endRow = HConstants.EMPTY_END_ROW;;
-  private List<byte[]> columns = new ArrayList<byte[]>();
+  private List<byte[]> columns = new ArrayList<>();
   private int batch = Integer.MAX_VALUE;
   private long startTime = 0;
   private long endTime = Long.MAX_VALUE;
   private String filter = null;
   private int maxVersions = Integer.MAX_VALUE;
   private int caching = -1;
-  private List<String> labels = new ArrayList<String>();
+  private List<String> labels = new ArrayList<>();
   private boolean cacheBlocks = true;
 
   /**
@@ -287,7 +287,7 @@ public class ScannerModel implements ProtobufMessageHandler, Serializable {
         } break;
         case FilterList:
           this.op = ((FilterList)filter).getOperator().toString();
-          this.filters = new ArrayList<FilterModel>();
+          this.filters = new ArrayList<>();
           for (Filter child: ((FilterList)filter).getFilters()) {
             this.filters.add(new FilterModel(child));
           }
@@ -300,13 +300,13 @@ public class ScannerModel implements ProtobufMessageHandler, Serializable {
             Base64.encodeBytes(((InclusiveStopFilter)filter).getStopRowKey());
           break;
         case MultipleColumnPrefixFilter:
-          this.prefixes = new ArrayList<String>();
+          this.prefixes = new ArrayList<>();
           for (byte[] prefix: ((MultipleColumnPrefixFilter)filter).getPrefix()) {
             this.prefixes.add(Base64.encodeBytes(prefix));
           }
           break;
         case MultiRowRangeFilter:
-          this.ranges = new ArrayList<RowRange>();
+          this.ranges = new ArrayList<>();
           for(RowRange range : ((MultiRowRangeFilter)filter).getRowRanges()) {
             this.ranges.add(new RowRange(range.getStartRow(), range.isStartRowInclusive(),
                 range.getStopRow(), range.isStopRowInclusive()));
@@ -349,14 +349,14 @@ public class ScannerModel implements ProtobufMessageHandler, Serializable {
           }
         } break;
         case SkipFilter:
-          this.filters = new ArrayList<FilterModel>();
+          this.filters = new ArrayList<>();
           this.filters.add(new FilterModel(((SkipFilter)filter).getFilter()));
           break;
         case TimestampsFilter:
           this.timestamps = ((TimestampsFilter)filter).getTimestamps();
           break;
         case WhileMatchFilter:
-          this.filters = new ArrayList<FilterModel>();
+          this.filters = new ArrayList<>();
           this.filters.add(
             new FilterModel(((WhileMatchFilter)filter).getFilter()));
           break;
@@ -391,7 +391,7 @@ public class ScannerModel implements ProtobufMessageHandler, Serializable {
         filter = new FamilyFilter(CompareOp.valueOf(op), comparator.build());
         break;
       case FilterList: {
-        List<Filter> list = new ArrayList<Filter>(filters.size());
+        List<Filter> list = new ArrayList<>(filters.size());
         for (FilterModel model: filters) {
           list.add(model.build());
         }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/StorageClusterStatusModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/StorageClusterStatusModel.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/StorageClusterStatusModel.java
index c97f3e8..3c3c50e 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/StorageClusterStatusModel.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/StorageClusterStatusModel.java
@@ -373,7 +373,7 @@ public class StorageClusterStatusModel
     private long requests;
     private int heapSizeMB;
     private int maxHeapSizeMB;
-    private List<Region> regions = new ArrayList<Region>();
+    private List<Region> regions = new ArrayList<>();
 
     /**
      * Add a region name to the list
@@ -505,8 +505,8 @@ public class StorageClusterStatusModel
     }
   }
 
-  private List<Node> liveNodes = new ArrayList<Node>();
-  private List<String> deadNodes = new ArrayList<String>();
+  private List<Node> liveNodes = new ArrayList<>();
+  private List<String> deadNodes = new ArrayList<>();
   private int regions;
   private long requests;
   private double averageLoad;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableInfoModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableInfoModel.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableInfoModel.java
index 7336eb8..c1db1da 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableInfoModel.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableInfoModel.java
@@ -53,7 +53,7 @@ public class TableInfoModel implements Serializable, ProtobufMessageHandler {
   private static final long serialVersionUID = 1L;
 
   private String name;
-  private List<TableRegionModel> regions = new ArrayList<TableRegionModel>();
+  private List<TableRegionModel> regions = new ArrayList<>();
 
   /**
    * Default constructor

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableListModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableListModel.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableListModel.java
index cc043be..f7d9a42 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableListModel.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableListModel.java
@@ -41,7 +41,7 @@ public class TableListModel implements Serializable, ProtobufMessageHandler {
 
   private static final long serialVersionUID = 1L;
 
-  private List<TableModel> tables = new ArrayList<TableModel>();
+  private List<TableModel> tables = new ArrayList<>();
 
   /**
    * Default constructor

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableSchemaModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableSchemaModel.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableSchemaModel.java
index 24fd09c..a93a3ca 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableSchemaModel.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableSchemaModel.java
@@ -74,8 +74,8 @@ public class TableSchemaModel implements Serializable, ProtobufMessageHandler {
     new QName(HColumnDescriptor.COMPRESSION);
 
   private String name;
-  private Map<QName,Object> attrs = new LinkedHashMap<QName,Object>();
-  private List<ColumnSchemaModel> columns = new ArrayList<ColumnSchemaModel>();
+  private Map<QName,Object> attrs = new LinkedHashMap<>();
+  private List<ColumnSchemaModel> columns = new ArrayList<>();
 
   /**
    * Default constructor.

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
index 0d29159..3559ee0 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
@@ -125,7 +125,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
   private TableName tableName = TABLE_NAME;
 
   protected HTableDescriptor TABLE_DESCRIPTOR;
-  protected Map<String, CmdDescriptor> commands = new TreeMap<String, CmdDescriptor>();
+  protected Map<String, CmdDescriptor> commands = new TreeMap<>();
   protected static Cluster cluster = new Cluster();
 
   volatile Configuration conf;
@@ -338,7 +338,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
     @Override
     public List<InputSplit> getSplits(JobContext job) throws IOException {
       // generate splits
-      List<InputSplit> splitList = new ArrayList<InputSplit>();
+      List<InputSplit> splitList = new ArrayList<>();
 
       for (FileStatus file: listStatus(job)) {
         if (file.isDirectory()) {
@@ -601,7 +601,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
    * @throws IOException
    */
   private void doMultipleClients(final Class<? extends Test> cmd) throws IOException {
-    final List<Thread> threads = new ArrayList<Thread>(this.N);
+    final List<Thread> threads = new ArrayList<>(this.N);
     final long[] timings = new long[this.N];
     final int perClientRows = R/N;
     final TableName tableName = this.tableName;
@@ -724,7 +724,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
     Path inputFile = new Path(inputDir, "input.txt");
     PrintStream out = new PrintStream(fs.create(inputFile));
     // Make input random.
-    Map<Integer, String> m = new TreeMap<Integer, String>();
+    Map<Integer, String> m = new TreeMap<>();
     Hash h = MurmurHash.getInstance();
     int perClientRows = (this.R / this.N);
     try {
@@ -1039,7 +1039,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
     protected Pair<byte[], byte[]> generateStartAndStopRows(int maxRange) {
       int start = this.rand.nextInt(Integer.MAX_VALUE) % totalRows;
       int stop = start + maxRange;
-      return new Pair<byte[],byte[]>(format(start), format(stop));
+      return new Pair<>(format(start), format(stop));
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestGetAndPutResource.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestGetAndPutResource.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestGetAndPutResource.java
index d6eb1b3..0f2de44 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestGetAndPutResource.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestGetAndPutResource.java
@@ -143,7 +143,7 @@ public class TestGetAndPutResource extends RowResourceBase {
     assertEquals(response.getCode(), 200);
     checkValuePB(TABLE, ROW_1, COLUMN_2, VALUE_2);
 
-    HashMap<String,String> otherCells = new HashMap<String, String>();
+    HashMap<String,String> otherCells = new HashMap<>();
     otherCells.put(COLUMN_2,VALUE_3);
 
     // On Success update both the cells
@@ -176,7 +176,7 @@ public class TestGetAndPutResource extends RowResourceBase {
     assertEquals(response.getCode(), 200);
     checkValueXML(TABLE, ROW_1, COLUMN_2, VALUE_2);
 
-    HashMap<String,String> otherCells = new HashMap<String, String>();
+    HashMap<String,String> otherCells = new HashMap<>();
     otherCells.put(COLUMN_2,VALUE_3);
 
     // On Success update both the cells
@@ -214,7 +214,7 @@ public class TestGetAndPutResource extends RowResourceBase {
     checkValuePB(TABLE, ROW_1, COLUMN_3, VALUE_3);
 
     // Deletes the following columns based on Column1 check
-    HashMap<String,String> cellsToDelete = new HashMap<String, String>();
+    HashMap<String,String> cellsToDelete = new HashMap<>();
     cellsToDelete.put(COLUMN_2,VALUE_2); // Value does not matter
     cellsToDelete.put(COLUMN_3,VALUE_3); // Value does not matter
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java
index 2ecba6a..2a0b460 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java
@@ -82,7 +82,7 @@ public class TestMultiRowResource {
 
   @Parameterized.Parameters
   public static Collection<Object[]> data() {
-    List<Object[]> params = new ArrayList<Object[]>(2);
+    List<Object[]> params = new ArrayList<>(2);
     params.add(new Object[] {Boolean.TRUE});
     params.add(new Object[] {Boolean.FALSE});
     return params;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestNamespacesInstanceResource.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestNamespacesInstanceResource.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestNamespacesInstanceResource.java
index 2058f50..58e8ea0 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestNamespacesInstanceResource.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestNamespacesInstanceResource.java
@@ -61,13 +61,13 @@ import org.junit.experimental.categories.Category;
 @Category({RestTests.class, MediumTests.class})
 public class TestNamespacesInstanceResource {
   private static String NAMESPACE1 = "TestNamespacesInstanceResource1";
-  private static Map<String,String> NAMESPACE1_PROPS = new HashMap<String,String>();
+  private static Map<String,String> NAMESPACE1_PROPS = new HashMap<>();
   private static String NAMESPACE2 = "TestNamespacesInstanceResource2";
-  private static Map<String,String> NAMESPACE2_PROPS = new HashMap<String,String>();
+  private static Map<String,String> NAMESPACE2_PROPS = new HashMap<>();
   private static String NAMESPACE3 = "TestNamespacesInstanceResource3";
-  private static Map<String,String> NAMESPACE3_PROPS = new HashMap<String,String>();
+  private static Map<String,String> NAMESPACE3_PROPS = new HashMap<>();
   private static String NAMESPACE4 = "TestNamespacesInstanceResource4";
-  private static Map<String,String> NAMESPACE4_PROPS = new HashMap<String,String>();
+  private static Map<String,String> NAMESPACE4_PROPS = new HashMap<>();
 
   private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
   private static final HBaseRESTTestingUtility REST_TEST_UTIL =
@@ -189,7 +189,7 @@ public class TestNamespacesInstanceResource {
     table.addFamily(colDesc);
     admin.createTable(table);
 
-    Map<String, String> nsProperties = new HashMap<String,String>();
+    Map<String, String> nsProperties = new HashMap<>();
     nsProperties.put("key1", "value1");
     List<String> nsTables = Arrays.asList("table1", "table2");
 
@@ -230,7 +230,7 @@ public class TestNamespacesInstanceResource {
 
     response = client.get(namespacePath, Constants.MIMETYPE_PROTOBUF);
     assertEquals(200, response.getCode());
-    tablemodel.setTables(new ArrayList<TableModel>());
+    tablemodel.setTables(new ArrayList<>());
     tablemodel.getObjectFromMessage(response.getBody());
     checkNamespaceTables(tablemodel.getTables(), nsTables);
 
@@ -406,7 +406,7 @@ public class TestNamespacesInstanceResource {
     nd4 = findNamespace(admin, NAMESPACE4);
     assertNotNull(nd3);
     assertNotNull(nd4);
-    checkNamespaceProperties(nd3, new HashMap<String,String>());
+    checkNamespaceProperties(nd3, new HashMap<>());
     checkNamespaceProperties(nd4, NAMESPACE4_PROPS);
 
     // Check cannot post tables that already exist.

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestScannersWithFilters.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestScannersWithFilters.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestScannersWithFilters.java
index 083ddbe..6816e53 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestScannersWithFilters.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestScannersWithFilters.java
@@ -957,7 +957,7 @@ public class TestScannersWithFilters {
     // Test getting a single row, single key using Row, Qualifier, and Value
     // regular expression and substring filters
     // Use must pass all
-    List<Filter> filters = new ArrayList<Filter>(3);
+    List<Filter> filters = new ArrayList<>(3);
     filters.add(new RowFilter(CompareOp.EQUAL,
       new RegexStringComparator(".+-2")));
     filters.add(new QualifierFilter(CompareOp.EQUAL,

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResource.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResource.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResource.java
index df920b1..f0c3d4a 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResource.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestSchemaResource.java
@@ -73,7 +73,7 @@ public class TestSchemaResource {
 
   @Parameterized.Parameters
   public static Collection<Object[]> data() {
-    List<Object[]> params = new ArrayList<Object[]>(2);
+    List<Object[]> params = new ArrayList<>(2);
     params.add(new Object[] {Boolean.TRUE});
     params.add(new Object[] {Boolean.FALSE});
     return params;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteTable.java
----------------------------------------------------------------------
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 0310d9f..f35208a 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
@@ -262,7 +262,7 @@ public class TestRemoteTable {
 
   @Test
   public void testMultiGet() throws Exception {
-    ArrayList<Get> gets = new ArrayList<Get>(2);
+    ArrayList<Get> gets = new ArrayList<>(2);
     gets.add(new Get(ROW_1));
     gets.add(new Get(ROW_2));
     Result[] results = remoteTable.get(gets);
@@ -272,7 +272,7 @@ public class TestRemoteTable {
     assertEquals(2, results[1].size());
 
     //Test Versions
-    gets = new ArrayList<Get>(2);
+    gets = new ArrayList<>(2);
     Get g = new Get(ROW_1);
     g.setMaxVersions(3);
     gets.add(g);
@@ -284,13 +284,13 @@ public class TestRemoteTable {
     assertEquals(3, results[1].size());
 
     //404
-    gets = new ArrayList<Get>(1);
+    gets = new ArrayList<>(1);
     gets.add(new Get(Bytes.toBytes("RESALLYREALLYNOTTHERE")));
     results = remoteTable.get(gets);
     assertNotNull(results);
     assertEquals(0, results.length);
 
-    gets = new ArrayList<Get>(3);
+    gets = new ArrayList<>(3);
     gets.add(new Get(Bytes.toBytes("RESALLYREALLYNOTTHERE")));
     gets.add(new Get(ROW_1));
     gets.add(new Get(ROW_2));
@@ -314,7 +314,7 @@ public class TestRemoteTable {
 
     // multiput
 
-    List<Put> puts = new ArrayList<Put>(3);
+    List<Put> puts = new ArrayList<>(3);
     put = new Put(ROW_3);
     put.addColumn(COLUMN_2, QUALIFIER_2, VALUE_2);
     puts.add(put);
@@ -408,7 +408,7 @@ public class TestRemoteTable {
    */
   @Test
   public void testScanner() throws IOException {
-    List<Put> puts = new ArrayList<Put>(4);
+    List<Put> puts = new ArrayList<>(4);
     Put put = new Put(ROW_1);
     put.addColumn(COLUMN_1, QUALIFIER_1, VALUE_1);
     puts.add(put);
@@ -499,7 +499,7 @@ public class TestRemoteTable {
    */
   @Test
   public void testIteratorScaner() throws IOException {
-    List<Put> puts = new ArrayList<Put>(4);
+    List<Put> puts = new ArrayList<>(4);
     Put put = new Put(ROW_1);
     put.addColumn(COLUMN_1, QUALIFIER_1, VALUE_1);
     puts.add(put);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesInstanceModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesInstanceModel.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesInstanceModel.java
index 0d4bbbd..3dee5cb 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesInstanceModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesInstanceModel.java
@@ -30,7 +30,7 @@ import org.junit.experimental.categories.Category;
 @Category({RestTests.class, SmallTests.class})
 public class TestNamespacesInstanceModel extends TestModelBase<NamespacesInstanceModel> {
 
-  public static final Map<String,String> NAMESPACE_PROPERTIES = new HashMap<String, String>();
+  public static final Map<String,String> NAMESPACE_PROPERTIES = new HashMap<>();
   public static final String NAMESPACE_NAME = "namespaceName";
 
   public TestNamespacesInstanceModel() throws Exception {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminClient.java
----------------------------------------------------------------------
diff --git a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminClient.java b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminClient.java
index 74e91fe..dfec736 100644
--- a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminClient.java
+++ b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminClient.java
@@ -183,4 +183,4 @@ class RSGroupAdminClient implements RSGroupAdmin {
       throw ProtobufUtil.handleRemoteException(e);
     }
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java
----------------------------------------------------------------------
diff --git a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java
index 1f0be5a..811cf71 100644
--- a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java
+++ b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java
@@ -82,7 +82,7 @@ public class RSGroupAdminServer implements RSGroupAdmin {
   private void checkOnlineServersOnly(Set<Address> servers) throws ConstraintException {
     // This uglyness is because we only have Address, not ServerName.
     // Online servers are keyed by ServerName.
-    Set<Address> onlineServers = new HashSet<Address>();
+    Set<Address> onlineServers = new HashSet<>();
     for(ServerName server: master.getServerManager().getOnlineServers().keySet()) {
       onlineServers.add(server.getAddress());
     }
@@ -114,7 +114,7 @@ public class RSGroupAdminServer implements RSGroupAdmin {
    * @return List of Regions associated with this <code>server</code>.
    */
   private List<HRegionInfo> getRegions(final Address server) {
-    LinkedList<HRegionInfo> regions = new LinkedList<HRegionInfo>();
+    LinkedList<HRegionInfo> regions = new LinkedList<>();
     for (Map.Entry<HRegionInfo, ServerName> el :
         master.getAssignmentManager().getRegionStates().getRegionAssignments().entrySet()) {
       if (el.getValue().getAddress().equals(server)) {
@@ -381,7 +381,7 @@ public class RSGroupAdminServer implements RSGroupAdmin {
       }
 
       //We balance per group instead of per table
-      List<RegionPlan> plans = new ArrayList<RegionPlan>();
+      List<RegionPlan> plans = new ArrayList<>();
       for(Map.Entry<TableName, Map<ServerName, List<HRegionInfo>>> tableMap:
           getRSGroupAssignmentsByTable(groupName).entrySet()) {
         LOG.info("Creating partial plan for table " + tableMap.getKey() + ": "

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.java
----------------------------------------------------------------------
diff --git a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.java b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.java
index b36fd21..30efc0a 100644
--- a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.java
+++ b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.java
@@ -120,7 +120,7 @@ public class RSGroupBasedLoadBalancer implements RSGroupableBalancer {
     }
 
     Map<ServerName,List<HRegionInfo>> correctedState = correctAssignments(clusterState);
-    List<RegionPlan> regionPlans = new ArrayList<RegionPlan>();
+    List<RegionPlan> regionPlans = new ArrayList<>();
 
     List<HRegionInfo> misplacedRegions = correctedState.get(LoadBalancer.BOGUS_SERVER_NAME);
     for (HRegionInfo regionInfo : misplacedRegions) {
@@ -129,10 +129,8 @@ public class RSGroupBasedLoadBalancer implements RSGroupableBalancer {
     try {
       List<RSGroupInfo> rsgi = rsGroupInfoManager.listRSGroups();
       for (RSGroupInfo info: rsgi) {
-        Map<ServerName, List<HRegionInfo>> groupClusterState =
-            new HashMap<ServerName, List<HRegionInfo>>();
-        Map<TableName, Map<ServerName, List<HRegionInfo>>> groupClusterLoad =
-            new HashMap<TableName, Map<ServerName, List<HRegionInfo>>>();
+        Map<ServerName, List<HRegionInfo>> groupClusterState = new HashMap<>();
+        Map<TableName, Map<ServerName, List<HRegionInfo>>> groupClusterLoad = new HashMap<>();
         for (Address sName : info.getServers()) {
           for(ServerName curr: clusterState.keySet()) {
             if(curr.getAddress().equals(sName)) {
@@ -180,7 +178,7 @@ public class RSGroupBasedLoadBalancer implements RSGroupableBalancer {
   public Map<ServerName, List<HRegionInfo>> retainAssignment(
       Map<HRegionInfo, ServerName> regions, List<ServerName> servers) throws HBaseIOException {
     try {
-      Map<ServerName, List<HRegionInfo>> assignments = new TreeMap<ServerName, List<HRegionInfo>>();
+      Map<ServerName, List<HRegionInfo>> assignments = new TreeMap<>();
       ListMultimap<String, HRegionInfo> groupToRegion = ArrayListMultimap.create();
       Set<HRegionInfo> misplacedRegions = getMisplacedRegions(regions);
       for (HRegionInfo region : regions.keySet()) {
@@ -213,13 +211,13 @@ public class RSGroupBasedLoadBalancer implements RSGroupableBalancer {
             candidateList);
         if (server != null) {
           if (!assignments.containsKey(server)) {
-            assignments.put(server, new ArrayList<HRegionInfo>());
+            assignments.put(server, new ArrayList<>());
           }
           assignments.get(server).add(region);
         } else {
           //if not server is available assign to bogus so it ends up in RIT
           if(!assignments.containsKey(LoadBalancer.BOGUS_SERVER_NAME)) {
-            assignments.put(LoadBalancer.BOGUS_SERVER_NAME, new ArrayList<HRegionInfo>());
+            assignments.put(LoadBalancer.BOGUS_SERVER_NAME, new ArrayList<>());
           }
           assignments.get(LoadBalancer.BOGUS_SERVER_NAME).add(region);
         }
@@ -299,7 +297,7 @@ public class RSGroupBasedLoadBalancer implements RSGroupableBalancer {
 
   private Set<HRegionInfo> getMisplacedRegions(
       Map<HRegionInfo, ServerName> regions) throws IOException {
-    Set<HRegionInfo> misplacedRegions = new HashSet<HRegionInfo>();
+    Set<HRegionInfo> misplacedRegions = new HashSet<>();
     for(Map.Entry<HRegionInfo, ServerName> region : regions.entrySet()) {
       HRegionInfo regionInfo = region.getKey();
       ServerName assignedServer = region.getValue();
@@ -321,13 +319,12 @@ public class RSGroupBasedLoadBalancer implements RSGroupableBalancer {
 
   private Map<ServerName, List<HRegionInfo>> correctAssignments(
        Map<ServerName, List<HRegionInfo>> existingAssignments){
-    Map<ServerName, List<HRegionInfo>> correctAssignments =
-        new TreeMap<ServerName, List<HRegionInfo>>();
-    List<HRegionInfo> misplacedRegions = new LinkedList<HRegionInfo>();
-    correctAssignments.put(LoadBalancer.BOGUS_SERVER_NAME, new LinkedList<HRegionInfo>());
+    Map<ServerName, List<HRegionInfo>> correctAssignments = new TreeMap<>();
+    List<HRegionInfo> misplacedRegions = new LinkedList<>();
+    correctAssignments.put(LoadBalancer.BOGUS_SERVER_NAME, new LinkedList<>());
     for (Map.Entry<ServerName, List<HRegionInfo>> assignments : existingAssignments.entrySet()){
       ServerName sName = assignments.getKey();
-      correctAssignments.put(sName, new LinkedList<HRegionInfo>());
+      correctAssignments.put(sName, new LinkedList<>());
       List<HRegionInfo> regions = assignments.getValue();
       for (HRegionInfo region : regions) {
         RSGroupInfo info = null;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRSGroupBasedLoadBalancer.java
----------------------------------------------------------------------
diff --git a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRSGroupBasedLoadBalancer.java b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRSGroupBasedLoadBalancer.java
index b794084..83fe122 100644
--- a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRSGroupBasedLoadBalancer.java
+++ b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRSGroupBasedLoadBalancer.java
@@ -89,7 +89,7 @@ public class TestRSGroupBasedLoadBalancer {
     rand = new SecureRandom();
     servers = generateServers(7);
     groupMap = constructGroupInfo(servers, groups);
-    tableMap = new HashMap<TableName, String>();
+    tableMap = new HashMap<>();
     tableDescs = constructTableDesc();
     Configuration conf = HBaseConfiguration.create();
     conf.set("hbase.regions.slop", "0");
@@ -231,7 +231,7 @@ public class TestRSGroupBasedLoadBalancer {
   public void testRetainAssignment() throws Exception {
     // Test simple case where all same servers are there
     Map<ServerName, List<HRegionInfo>> currentAssignments = mockClusterServers();
-    Map<HRegionInfo, ServerName> inputForTest = new HashMap<HRegionInfo, ServerName>();
+    Map<HRegionInfo, ServerName> inputForTest = new HashMap<>();
     for (ServerName sn : currentAssignments.keySet()) {
       for (HRegionInfo region : currentAssignments.get(sn)) {
         inputForTest.put(region, sn);
@@ -264,8 +264,8 @@ public class TestRSGroupBasedLoadBalancer {
       Map<ServerName, List<HRegionInfo>> assignment)
       throws FileNotFoundException, IOException {
     // Verify condition 1, every region assigned, and to online server
-    Set<ServerName> onlineServerSet = new TreeSet<ServerName>(servers);
-    Set<HRegionInfo> assignedRegions = new TreeSet<HRegionInfo>();
+    Set<ServerName> onlineServerSet = new TreeSet<>(servers);
+    Set<HRegionInfo> assignedRegions = new TreeSet<>();
     for (Map.Entry<ServerName, List<HRegionInfo>> a : assignment.entrySet()) {
       assertTrue(
           "Region assigned to server that was not listed as online",
@@ -276,7 +276,7 @@ public class TestRSGroupBasedLoadBalancer {
     assertEquals(existing.size(), assignedRegions.size());
 
     // Verify condition 2, every region must be assigned to correct server.
-    Set<String> onlineHostNames = new TreeSet<String>();
+    Set<String> onlineHostNames = new TreeSet<>();
     for (ServerName s : servers) {
       onlineHostNames.add(s.getHostname());
     }
@@ -402,7 +402,7 @@ public class TestRSGroupBasedLoadBalancer {
 
   private Map<ServerName, List<HRegionInfo>> mockClusterServers() throws IOException {
     assertTrue(servers.size() == regionAssignment.length);
-    Map<ServerName, List<HRegionInfo>> assignment = new TreeMap<ServerName, List<HRegionInfo>>();
+    Map<ServerName, List<HRegionInfo>> assignment = new TreeMap<>();
     for (int i = 0; i < servers.size(); i++) {
       int numRegions = regionAssignment[i];
       List<HRegionInfo> regions = assignedRegions(numRegions, servers.get(i));
@@ -418,7 +418,7 @@ public class TestRSGroupBasedLoadBalancer {
    * @return List of HRegionInfo.
    */
   private List<HRegionInfo> randomRegions(int numRegions) {
-    List<HRegionInfo> regions = new ArrayList<HRegionInfo>(numRegions);
+    List<HRegionInfo> regions = new ArrayList<>(numRegions);
     byte[] start = new byte[16];
     byte[] end = new byte[16];
     rand.nextBytes(start);
@@ -444,7 +444,7 @@ public class TestRSGroupBasedLoadBalancer {
    * @throws java.io.IOException Signals that an I/O exception has occurred.
    */
   private List<HRegionInfo> assignedRegions(int numRegions, ServerName sn) throws IOException {
-    List<HRegionInfo> regions = new ArrayList<HRegionInfo>(numRegions);
+    List<HRegionInfo> regions = new ArrayList<>(numRegions);
     byte[] start = new byte[16];
     byte[] end = new byte[16];
     Bytes.putInt(start, 0, numRegions << 1);
@@ -460,7 +460,7 @@ public class TestRSGroupBasedLoadBalancer {
   }
 
   private static List<ServerName> generateServers(int numServers) {
-    List<ServerName> servers = new ArrayList<ServerName>(numServers);
+    List<ServerName> servers = new ArrayList<>(numServers);
     for (int i = 0; i < numServers; i++) {
       String host = "server" + rand.nextInt(100000);
       int port = rand.nextInt(60000);
@@ -481,7 +481,7 @@ public class TestRSGroupBasedLoadBalancer {
     assertTrue(servers != null);
     assertTrue(servers.size() >= groups.length);
     int index = 0;
-    Map<String, RSGroupInfo> groupMap = new HashMap<String, RSGroupInfo>();
+    Map<String, RSGroupInfo> groupMap = new HashMap<>();
     for (String grpName : groups) {
       RSGroupInfo RSGroupInfo = new RSGroupInfo(grpName);
       RSGroupInfo.addServer(servers.get(index).getAddress());

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java
----------------------------------------------------------------------
diff --git a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java
index 9096dfe..5f9116b 100644
--- a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java
+++ b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java
@@ -95,7 +95,7 @@ public abstract class TestRSGroupsBase {
     assertTrue(defaultInfo.getServers().size() >= serverCount);
     rsGroupAdmin.addRSGroup(groupName);
 
-    Set<Address> set = new HashSet<Address>();
+    Set<Address> set = new HashSet<>();
     for(Address server: defaultInfo.getServers()) {
       if(set.size() == serverCount) {
         break;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/HDFSBlocksDistribution.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/HDFSBlocksDistribution.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/HDFSBlocksDistribution.java
index 3773863..b0dfd42 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/HDFSBlocksDistribution.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/HDFSBlocksDistribution.java
@@ -104,8 +104,7 @@ public class HDFSBlocksDistribution {
    * Constructor
    */
   public HDFSBlocksDistribution() {
-    this.hostAndWeights =
-      new TreeMap<String,HostAndWeight>();
+    this.hostAndWeights = new TreeMap<>();
   }
 
   /**
@@ -229,7 +228,7 @@ public class HDFSBlocksDistribution {
    */
   public List<String> getTopHosts() {
     HostAndWeight[] hostAndWeights = getTopHostsWithWeights();
-    List<String> topHosts = new ArrayList<String>(hostAndWeights.length);
+    List<String> topHosts = new ArrayList<>(hostAndWeights.length);
     for(HostAndWeight haw : hostAndWeights) {
       topHosts.add(haw.getHost());
     }
@@ -240,8 +239,7 @@ public class HDFSBlocksDistribution {
    * return the sorted list of hosts in terms of their weights
    */
   public HostAndWeight[] getTopHostsWithWeights() {
-    NavigableSet<HostAndWeight> orderedHosts = new TreeSet<HostAndWeight>(
-      new HostAndWeight.WeightComparator());
+    NavigableSet<HostAndWeight> orderedHosts = new TreeSet<>(new HostAndWeight.WeightComparator());
     orderedHosts.addAll(this.hostAndWeights.values());
     return orderedHosts.descendingSet().toArray(new HostAndWeight[orderedHosts.size()]);
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/HealthChecker.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/HealthChecker.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/HealthChecker.java
index 530a323..45e0f3a 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/HealthChecker.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/HealthChecker.java
@@ -59,7 +59,7 @@ class HealthChecker {
   public void init(String location, long timeout) {
     this.healthCheckScript = location;
     this.scriptTimeout = timeout;
-    ArrayList<String> execScript = new ArrayList<String>();
+    ArrayList<String> execScript = new ArrayList<>();
     execScript.add(healthCheckScript);
     this.shexec = new ShellCommandExecutor(execScript.toArray(new String[execScript.size()]), null,
         null, scriptTimeout);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/JMXListener.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/JMXListener.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/JMXListener.java
index 9265fb8..788d25b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/JMXListener.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/JMXListener.java
@@ -101,7 +101,7 @@ public class JMXListener implements Coprocessor {
               + ",passwordFile:" + passwordFile + ",accessFile:" + accessFile);
 
     // Environment map
-    HashMap<String, Object> jmxEnv = new HashMap<String, Object>();
+    HashMap<String, Object> jmxEnv = new HashMap<>();
 
     RMIClientSocketFactory csf = null;
     RMIServerSocketFactory ssf = null;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java
index 33fff97..255ca31 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java
@@ -61,10 +61,8 @@ import org.apache.hadoop.hbase.util.JVMClusterUtil;
 @InterfaceStability.Evolving
 public class LocalHBaseCluster {
   private static final Log LOG = LogFactory.getLog(LocalHBaseCluster.class);
-  private final List<JVMClusterUtil.MasterThread> masterThreads =
-    new CopyOnWriteArrayList<JVMClusterUtil.MasterThread>();
-  private final List<JVMClusterUtil.RegionServerThread> regionThreads =
-    new CopyOnWriteArrayList<JVMClusterUtil.RegionServerThread>();
+  private final List<JVMClusterUtil.MasterThread> masterThreads = new CopyOnWriteArrayList<>();
+  private final List<JVMClusterUtil.RegionServerThread> regionThreads = new CopyOnWriteArrayList<>();
   private final static int DEFAULT_NO = 1;
   /** local mode */
   public static final String LOCAL = "local";
@@ -257,8 +255,7 @@ public class LocalHBaseCluster {
    * list).
    */
   public List<JVMClusterUtil.RegionServerThread> getLiveRegionServers() {
-    List<JVMClusterUtil.RegionServerThread> liveServers =
-      new ArrayList<JVMClusterUtil.RegionServerThread>();
+    List<JVMClusterUtil.RegionServerThread> liveServers = new ArrayList<>();
     List<RegionServerThread> list = getRegionServers();
     for (JVMClusterUtil.RegionServerThread rst: list) {
       if (rst.isAlive()) liveServers.add(rst);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/SslRMIClientSocketFactorySecure.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/SslRMIClientSocketFactorySecure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/SslRMIClientSocketFactorySecure.java
index e1bc4ef..d505d6f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/SslRMIClientSocketFactorySecure.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/SslRMIClientSocketFactorySecure.java
@@ -25,7 +25,7 @@ public class SslRMIClientSocketFactorySecure extends SslRMIClientSocketFactory {
   @Override
   public Socket createSocket(String host, int port) throws IOException {
     SSLSocket socket = (SSLSocket) super.createSocket(host, port);
-    ArrayList<String> secureProtocols = new ArrayList<String>();
+    ArrayList<String> secureProtocols = new ArrayList<>();
     for (String p : socket.getEnabledProtocols()) {
       if (!p.contains("SSLv3")) {
         secureProtocols.add(p);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/SslRMIServerSocketFactorySecure.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/SslRMIServerSocketFactorySecure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/SslRMIServerSocketFactorySecure.java
index bd946252..8560ddc 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/SslRMIServerSocketFactorySecure.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/SslRMIServerSocketFactorySecure.java
@@ -42,7 +42,7 @@ public class SslRMIServerSocketFactorySecure extends SslRMIServerSocketFactory {
         sslSocket.setUseClientMode(false);
         sslSocket.setNeedClientAuth(false);
 
-        ArrayList<String> secureProtocols = new ArrayList<String>();
+        ArrayList<String> secureProtocols = new ArrayList<>();
         for (String p : sslSocket.getEnabledProtocols()) {
           if (!p.contains("SSLv3")) {
             secureProtocols.add(p);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/ZKNamespaceManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ZKNamespaceManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ZKNamespaceManager.java
index 36df002..6ae9637 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ZKNamespaceManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ZKNamespaceManager.java
@@ -55,7 +55,7 @@ public class ZKNamespaceManager extends ZooKeeperListener {
   public ZKNamespaceManager(ZooKeeperWatcher zkw) throws IOException {
     super(zkw);
     nsZNode = zkw.znodePaths.namespaceZNode;
-    cache = new ConcurrentSkipListMap<String, NamespaceDescriptor>();
+    cache = new ConcurrentSkipListMap<>();
   }
 
   public void start() throws IOException {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java
index ee32887..52185f1 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java
@@ -126,7 +126,7 @@ public class HFileArchiver {
     // otherwise, we attempt to archive the store files
 
     // build collection of just the store directories to archive
-    Collection<File> toArchive = new ArrayList<File>();
+    Collection<File> toArchive = new ArrayList<>();
     final PathFilter dirFilter = new FSUtils.DirFilter(fs);
     PathFilter nonHidden = new PathFilter() {
       @Override
@@ -324,7 +324,7 @@ public class HFileArchiver {
       if (LOG.isTraceEnabled()) LOG.trace("Created archive directory:" + baseArchiveDir);
     }
 
-    List<File> failures = new ArrayList<File>();
+    List<File> failures = new ArrayList<>();
     String startTime = Long.toString(start);
     for (File file : toArchive) {
       // if its a file archive it
@@ -475,7 +475,7 @@ public class HFileArchiver {
   private static void deleteStoreFilesWithoutArchiving(Collection<StoreFile> compactedFiles)
       throws IOException {
     LOG.debug("Deleting store files without archiving.");
-    List<IOException> errors = new ArrayList<IOException>(0);
+    List<IOException> errors = new ArrayList<>(0);
     for (StoreFile hsf : compactedFiles) {
       try {
         hsf.deleteReader();

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/example/HFileArchiveTableMonitor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/example/HFileArchiveTableMonitor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/example/HFileArchiveTableMonitor.java
index 3258cbb..3a16534 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/example/HFileArchiveTableMonitor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/example/HFileArchiveTableMonitor.java
@@ -32,7 +32,7 @@ import org.apache.commons.logging.LogFactory;
  */
 public class HFileArchiveTableMonitor {
   private static final Log LOG = LogFactory.getLog(HFileArchiveTableMonitor.class);
-  private final Set<String> archivedTables = new TreeSet<String>();
+  private final Set<String> archivedTables = new TreeSet<>();
 
   /**
    * Set the tables to be archived. Internally adds each table and attempts to

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
index dde2f10..8ff118e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
@@ -61,7 +61,7 @@ public class ClientSideRegionScanner extends AbstractClientScanner {
 
     // create an internal region scanner
     this.scanner = region.getScanner(scan);
-    values = new ArrayList<Cell>();
+    values = new ArrayList<>();
 
     if (scanMetrics == null) {
       initScanMetrics(scan);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HTableWrapper.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HTableWrapper.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HTableWrapper.java
index 6a73261..051a8f2 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HTableWrapper.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HTableWrapper.java
@@ -84,7 +84,7 @@ public final class HTableWrapper implements Table {
   }
 
   public void internalClose() throws IOException {
-    List<IOException> exceptions = new ArrayList<IOException>(2);
+    List<IOException> exceptions = new ArrayList<>(2);
     try {
       table.close();
     } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/client/TableSnapshotScanner.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/TableSnapshotScanner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/TableSnapshotScanner.java
index 4601ae4..49a718c 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/TableSnapshotScanner.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/TableSnapshotScanner.java
@@ -127,7 +127,7 @@ public class TableSnapshotScanner extends AbstractClientScanner {
     final List<HRegionInfo> restoredRegions = meta.getRegionsToAdd();
 
     htd = meta.getTableDescriptor();
-    regions = new ArrayList<HRegionInfo>(restoredRegions.size());
+    regions = new ArrayList<>(restoredRegions.size());
     for (HRegionInfo hri: restoredRegions) {
       if (CellUtil.overlappingKeys(scan.getStartRow(), scan.getStopRow(),
           hri.getStartKey(), hri.getEndKey())) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/constraint/ConstraintProcessor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/constraint/ConstraintProcessor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/constraint/ConstraintProcessor.java
index 9eaecd3..f217641 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/constraint/ConstraintProcessor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/constraint/ConstraintProcessor.java
@@ -48,7 +48,7 @@ public class ConstraintProcessor implements RegionObserver {
 
   private final ClassLoader classloader;
 
-  private List<? extends Constraint> constraints = new ArrayList<Constraint>();
+  private List<? extends Constraint> constraints = new ArrayList<>();
 
   /**
    * Create the constraint processor.

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/constraint/Constraints.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/constraint/Constraints.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/constraint/Constraints.java
index 09c935d..5ed9aa8 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/constraint/Constraints.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/constraint/Constraints.java
@@ -120,7 +120,7 @@ public final class Constraints {
     disable(desc);
 
     // remove all the constraint settings
-    List<Bytes> keys = new ArrayList<Bytes>();
+    List<Bytes> keys = new ArrayList<>();
     // loop through all the key, values looking for constraints
     for (Map.Entry<Bytes, Bytes> e : desc
         .getValues().entrySet()) {
@@ -165,7 +165,7 @@ public final class Constraints {
     String key = serializeConstraintClass(clazz);
     String value = desc.getValue(key);
 
-    return value == null ? null : new Pair<String, String>(key, value);
+    return value == null ? null : new Pair<>(key, value);
   }
 
   /**
@@ -557,7 +557,7 @@ public final class Constraints {
    */
   static List<? extends Constraint> getConstraints(HTableDescriptor desc,
       ClassLoader classloader) throws IOException {
-    List<Constraint> constraints = new ArrayList<Constraint>();
+    List<Constraint> constraints = new ArrayList<>();
     // loop through all the key, values looking for constraints
     for (Map.Entry<Bytes, Bytes> e : desc
         .getValues().entrySet()) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java
index a226eb6..1654c67 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java
@@ -761,7 +761,7 @@ public class ZKSplitLogManagerCoordination extends ZooKeeperListener implements
     if (taskOrRescanList == null || taskOrRescanList.isEmpty()) {
       return Collections.<String> emptyList();
     }
-    List<String> taskList = new ArrayList<String>();
+    List<String> taskList = new ArrayList<>();
     for (String taskOrRescan : taskOrRescanList) {
       // Remove rescan nodes
       if (!ZKSplitLog.isRescanNode(taskOrRescan)) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
index 2bf9d78..70445bd 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
@@ -449,7 +449,7 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
             if (!recoveringRegions.isEmpty()) {
               // Make a local copy to prevent ConcurrentModificationException when other threads
               // modify recoveringRegions
-              List<String> tmpCopy = new ArrayList<String>(recoveringRegions.keySet());
+              List<String> tmpCopy = new ArrayList<>(recoveringRegions.keySet());
               int listSize = tmpCopy.size();
               for (int i = 0; i < listSize; i++) {
                 String region = tmpCopy.get(i);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
index 1d58bf9..bdface1 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
@@ -81,8 +81,7 @@ public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
   private static final Log LOG = LogFactory.getLog(CoprocessorHost.class);
   protected Abortable abortable;
   /** Ordered set of loaded coprocessors with lock */
-  protected SortedList<E> coprocessors =
-      new SortedList<E>(new EnvironmentPriorityComparator());
+  protected SortedList<E> coprocessors = new SortedList<>(new EnvironmentPriorityComparator());
   protected Configuration conf;
   // unique file prefix to use for local copies of jars when classloading
   protected String pathPrefix;
@@ -118,7 +117,7 @@ public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
    * to master).
    */
   public Set<String> getCoprocessors() {
-    Set<String> returnValue = new TreeSet<String>();
+    Set<String> returnValue = new TreeSet<>();
     for (CoprocessorEnvironment e: coprocessors) {
       returnValue.add(e.getInstance().getClass().getSimpleName());
     }
@@ -318,7 +317,7 @@ public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
    * @return the list of coprocessors, or null if not found
    */
   public <T extends Coprocessor> List<T> findCoprocessors(Class<T> cls) {
-    ArrayList<T> ret = new ArrayList<T>();
+    ArrayList<T> ret = new ArrayList<>();
 
     for (E env: coprocessors) {
       Coprocessor cp = env.getInstance();
@@ -338,7 +337,7 @@ public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
    * @return the list of CoprocessorEnvironment, or null if not found
    */
   public List<CoprocessorEnvironment> findCoprocessorEnvironment(Class<?> cls) {
-    ArrayList<CoprocessorEnvironment> ret = new ArrayList<CoprocessorEnvironment>();
+    ArrayList<CoprocessorEnvironment> ret = new ArrayList<>();
 
     for (E env: coprocessors) {
       Coprocessor cp = env.getInstance();
@@ -373,7 +372,7 @@ public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
    * @return A set of ClassLoader instances
    */
   Set<ClassLoader> getExternalClassLoaders() {
-    Set<ClassLoader> externalClassLoaders = new HashSet<ClassLoader>();
+    Set<ClassLoader> externalClassLoaders = new HashSet<>();
     final ClassLoader systemClassLoader = this.getClass().getClassLoader();
     for (E env : coprocessors) {
       ClassLoader cl = env.getInstance().getClass().getClassLoader();
@@ -664,7 +663,7 @@ public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
    * Used to limit legacy handling to once per Coprocessor class per classloader.
    */
   private static final Set<Class<? extends Coprocessor>> legacyWarning =
-      new ConcurrentSkipListSet<Class<? extends Coprocessor>>(
+      new ConcurrentSkipListSet<>(
           new Comparator<Class<? extends Coprocessor>>() {
             @Override
             public int compare(Class<? extends Coprocessor> c1, Class<? extends Coprocessor> c2) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MultiRowMutationEndpoint.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MultiRowMutationEndpoint.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MultiRowMutationEndpoint.java
index 834b54c..3773fa6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MultiRowMutationEndpoint.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MultiRowMutationEndpoint.java
@@ -86,9 +86,9 @@ CoprocessorService, Coprocessor {
     MutateRowsResponse response = MutateRowsResponse.getDefaultInstance();
     try {
       // set of rows to lock, sorted to avoid deadlocks
-      SortedSet<byte[]> rowsToLock = new TreeSet<byte[]>(Bytes.BYTES_COMPARATOR);
+      SortedSet<byte[]> rowsToLock = new TreeSet<>(Bytes.BYTES_COMPARATOR);
       List<MutationProto> mutateRequestList = request.getMutationRequestList();
-      List<Mutation> mutations = new ArrayList<Mutation>(mutateRequestList.size());
+      List<Mutation> mutations = new ArrayList<>(mutateRequestList.size());
       for (MutationProto m : mutateRequestList) {
         mutations.add(ProtobufUtil.toMutation(m));
       }


Mime
View raw message