Do not declare thrown Exception AbstractLeader 66/36866/2
authorRobert Varga <rovarga@cisco.com>
Wed, 30 Mar 2016 08:50:34 +0000 (10:50 +0200)
committerTony Tkacik <ttkacik@cisco.com>
Wed, 30 Mar 2016 09:26:44 +0000 (09:26 +0000)
These methods throw only runtime exceptions, hence tighten the contract
and eliminate a sonar warning.

Change-Id: Ibb8b1f0053f38c5a68cf7e3caaf112c3b7beed09
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractLeader.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Leader.java

index 380e22a..e58d4f5 100644 (file)
@@ -158,7 +158,7 @@ public class Leader extends AbstractLeader {
     }
 
     @Override
-    public void close() throws Exception {
+    public void close() {
         if(leadershipTransferContext != null) {
             leadershipTransferContext.transferCohort.abortTransfer();
         }