HBASE-20082 Fix findbugs errors only on master which are introduced by HBASE-19397
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/5202f293 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/5202f293 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/5202f293 Branch: refs/heads/HBASE-19397-branch-2 Commit: 5202f293d43802938afaa25ee398ea4212ca95be Parents: 3db22e6 Author: zhangduo <zhang...@apache.org> Authored: Mon Feb 26 10:22:09 2018 +0800 Committer: zhangduo <zhang...@apache.org> Committed: Fri Mar 2 15:00:51 2018 +0800 ---------------------------------------------------------------------- .../hadoop/hbase/master/replication/RefreshPeerProcedure.java | 2 ++ .../hbase/replication/regionserver/ReplicationSourceManager.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/5202f293/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RefreshPeerProcedure.java ---------------------------------------------------------------------- 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 1253ef9..ba9bcdc 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<MasterProcedureEnv> 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; http://git-wip-us.apache.org/repos/asf/hbase/blob/5202f293/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java ---------------------------------------------------------------------- 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 6965f55..d11dc8e 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(); } }