From d4e0fc74d481417713ea0496c97ea7db20bf0324 Mon Sep 17 00:00:00 2001 From: zhangduo Date: Mon, 26 Feb 2018 10:22:09 +0800 Subject: [PATCH] HBASE-20082 Fix findbugs errors only on master which are introduced by HBASE-19397 --- .../hadoop/hbase/master/replication/RefreshPeerProcedure.java | 2 ++ .../replication/regionserver/ReplicationSourceManager.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RefreshPeerProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RefreshPeerProcedure.java index 1253ef9bc51..ba9bcdc02dd 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RefreshPeerProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RefreshPeerProcedure.java @@ -50,6 +50,8 @@ public class RefreshPeerProcedure extends Procedure private PeerOperationType type; + @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "IS2_INCONSISTENT_SYNC", + justification = "Will never change after construction") private ServerName targetServer; private boolean dispatched; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java index 6965f55fa0d..d11dc8e31a3 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java @@ -402,7 +402,7 @@ public class ReplicationSourceManager implements ReplicationListener { toStartup.add(replicationSource); } } - for (ReplicationSourceInterface replicationSource : oldsources) { + for (ReplicationSourceInterface replicationSource : toStartup) { replicationSource.startup(); } }