Remove unused exceptions 39/74339/5
authorStephen Kitt <skitt@redhat.com>
Mon, 23 Jul 2018 14:45:38 +0000 (16:45 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 25 Jul 2018 11:17:13 +0000 (11:17 +0000)
This drops exception declarations which are never used.

Change-Id: Icc8938b9c3b437a0d5961ec1b481fd06c52d47f2
Signed-off-by: Stephen Kitt <skitt@redhat.com>
216 files changed:
benchmark/ntfbenchmark/src/main/java/ntfbenchmark/impl/NtfbenchmarkProvider.java
opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/NioEventLoopGroupCloseable.java
opendaylight/config/netty-timer-config/src/main/java/org/opendaylight/controller/config/yang/netty/timer/HashedWheelTimerCloseable.java
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/FlexibleThreadPoolWrapper.java
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/NamingThreadPoolFactory.java
opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/concepts/LocalHistoryIdentifier.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/AbstractRequestFailureTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/ClosedTransactionExceptionTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/ConnectClientFailureTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/ConnectClientRequestTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/ConnectClientSuccessTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/ExistsTransactionRequestTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/ExistsTransactionSuccessTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/LocalHistoryFailureTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/LocalHistorySuccessTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/ModifyTransactionRequestBuilderTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/ModifyTransactionRequestEmptyTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/ModifyTransactionRequestTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/ModifyTransactionSuccessTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/ReadTransactionRequestTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/ReadTransactionSuccessNoDataTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/ReadTransactionSuccessTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/TransactionAbortRequestTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/TransactionAbortSuccessTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/TransactionCanCommitSuccessTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/TransactionCommitSuccessTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/TransactionDoCommitRequestTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/TransactionFailureTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/TransactionPreCommitRequestTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/TransactionPreCommitSuccessTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/TransactionPurgeRequestTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/TransactionPurgeResponseTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/concepts/AbstractEnvelopeTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/concepts/FrontendTypeTest.java
opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/concepts/RequestEnvelopeTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/AbstractClientConnectionTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/AbstractTransmitQueueTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/ActorBehaviorTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/ClientActorContextTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/ConnectedClientConnectionTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/ConnectingClientConnectionTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/HaltedTransmitQueueTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/InversibleLockTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/MockedSnapshotStore.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/ReconnectingClientConnectionTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/TransmittingTransmitQueueTest.java
opendaylight/md-sal/mdsal-trace/cli/src/main/java/org/opendaylight/controller/md/sal/trace/cli/PrintOpenTransactionsCommand.java
opendaylight/md-sal/messagebus-impl/src/test/java/org/opendaylight/controller/messagebus/app/impl/EventSourceRegistrationImplTest.java
opendaylight/md-sal/messagebus-impl/src/test/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopicTest.java
opendaylight/md-sal/messagebus-impl/src/test/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopologyTest.java
opendaylight/md-sal/messagebus-util/src/test/java/org/opendaylight/controller/messagebus/app/util/TopicDOMNotificationTest.java
opendaylight/md-sal/messagebus-util/src/test/java/org/opendaylight/controller/messagebus/app/util/UtilTest.java
opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/ClientActor.java
opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/ExampleRoleChangeListener.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/NoopRaftActorSnapshotCohort.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/EmptyExternalizableProxy.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVoteReply.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/persisted/ApplyJournalEntries.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/persisted/DeleteEntries.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/AbstractRaftActorIntegrationTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/IsolationScenarioTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/LeadershipTransferIntegrationTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/MigratedMessagesTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/PreLeaderScenarioTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorServerConfigurationSupportTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RecoveryIntegrationSingleNodeTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RecoveryIntegrationTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/ReplicationAndSnapshotsIntegrationTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/ReplicationAndSnapshotsWithLaggingFollowerIntegrationTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/ReplicationWithSlicedPayloadIntegrationTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/SnapshotManagerTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractLeaderElectionScenarioTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractLeaderTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/FollowerIdentifierTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/IsolatedLeaderTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/LeaderTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/PartitionedLeadersElectionScenarioTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/SyncStatusTrackerTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/utils/DoNothingActor.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/utils/EchoActor.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/AbstractBrokerAwareActivator.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMMountPointServiceAdapter.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMNotificationPublishServiceAdapter.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMNotificationServiceAdapter.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMRpcServiceAdapter.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/ContextReferenceExtractor.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/LazyDOMRpcResultFuture.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/RpcServiceAdapter.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/RootBindingAwareBroker.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/Bug4513Test.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/DataTreeChangeListenerTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/util/BindingTestContext.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/connect/dom/CrossBrokerRpcTest.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/connect/dom/DOMRpcServiceTestBugfix560.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/connect/dom/MessageCapturingFlowService.java
opendaylight/md-sal/sal-binding-util/src/main/java/org/opendaylight/controller/md/sal/binding/util/BindingContextUtils.java
opendaylight/md-sal/sal-cluster-admin-impl/src/main/java/org/opendaylight/controller/cluster/datastore/admin/ClusterAdminRpcService.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/AbstractUntypedActor.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/AbstractUntypedPersistentActor.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/NormalizedNodePruner.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/notifications/RoleChangeNotifier.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/common/actor/MeteredBoundedMailboxTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/common/actor/QuarantinedMonitorActorTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/SampleNormalizedNodeSerializable.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/SerializationUtilsTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/messaging/AbstractMessagingTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/messaging/MessageAssemblerTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/notifications/RoleChangeNotifierTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/persistence/LocalSnapshotStoreTest.java
opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/util/compat/DataNormalizationOperation.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractFrontendHistory.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/FrontendReadOnlyTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/FrontendReadWriteTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LeaderFrontendState.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalFrontendHistory.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalThreePhaseCommitCohort.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/StandaloneFrontendHistory.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TerminationMonitor.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/actors/DataTreeNotificationListenerRegistrationActor.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/actors/ShardSnapshotActor.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/selectionstrategy/EntityOwnerSelectionStrategyConfigReader.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CloseDataTreeNotificationListenerRegistration.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CloseDataTreeNotificationListenerRegistrationReply.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataTreeChangedReply.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/EmptyExternalizable.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/DeleteModification.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/MergeModification.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/WriteModification.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/AbstractIdentifiablePayload.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/CommitTransactionPayload.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/FrontendClientMetadata.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/FrontendShardDataTreeSnapshotMetadata.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/ShardSnapshotState.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/CDSShardAccessImpl.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/RoleChangeListenerActor.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/ShardedDataTreeActor.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ClientBackedDataStoreTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ClientBackedReadTransactionTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ClientBackedReadWriteTransactionTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ClientBackedTransactionChainTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ClientBackedTransactionTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ClientBackedWriteTransactionTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractClientHandleTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractClientHistoryTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractDataStoreClientBehaviorTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractProxyTransactionTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/ClientLocalHistoryTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/ClientTransactionCommitCohortTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/ClientTransactionCursorTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/ClientTransactionTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/DirectTransactionCommitCohortTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/EmptyTransactionCommitCohortTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalProxyTransactionTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalReadOnlyProxyTransactionTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalReadWriteProxyTransactionTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/ModuleShardBackendResolverTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/RemoteProxyTransactionTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/SingleClientHistoryTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/VotingFutureTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractActorTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractClusterRefActorTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardManagerTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionProxyTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortIntegrationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreIntegrationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ForwardingDataTreeChangeListenerTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/IntegrationTestKit.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/RoleChangeNotifierTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardCommitCoordinationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/actors/DataTreeNotificationListenerRegistrationActorTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/entityownership/AbstractClusterRefEntityOwnershipTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipShardTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/entityownership/selectionstrategy/EntityOwnerSelectionStrategyConfigReaderTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/jmx/mbeans/shard/ShardStatsTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManagerTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/shardstrategy/DefaultShardStrategyTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/shardstrategy/ModuleShardStrategyTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/ActorContextTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/ForwardingActor.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/NormalizedNodeAggregatorTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/sharding/DistributedShardFrontendTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTreeTest.java
opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMTransactionChainTest.java
opendaylight/md-sal/sal-dummy-distributed-datastore/src/main/java/org/opendaylight/controller/dummy/datastore/DummyShardManager.java
opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDataStoreTest.java
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteDOMRpcFuture.java
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RpcRegistrar.java
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/TerminationMonitor.java
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/RpcResponse.java
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/gossip/BucketStoreActor.java
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/gossip/Gossiper.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/AbstractRpcTest.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteRpcProviderConfigTest.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteRpcProviderFactoryTest.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteRpcProviderTest.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RpcErrorsExceptionTest.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RpcListenerTest.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RpcRegistrarTest.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistryTest.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/gossip/GossiperTest.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteRpcRegistryMXBeanImplTest.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/utils/LatestEntryRoutingLogicTest.java
opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/MdsalLowLevelTestProvider.java
opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/PeopleProvider.java

index f6c112da52d91784ece26a321662a74e384952e6..cb5925f68a4ac9e2c6bcf130aa59d334487d5890 100644 (file)
@@ -48,7 +48,7 @@ public class NtfbenchmarkProvider implements AutoCloseable, NtfbenchmarkService
     }
 
     @Override
-    public void close() throws Exception {
+    public void close() {
         LOG.info("NtfbenchmarkProvider closed");
     }
 
index 5f92f943e38253b2dad493b14343749393d5a162..51bf1f0e5272b99ae9aee636c903d8880da06bc9 100644 (file)
@@ -19,7 +19,7 @@ public class NioEventLoopGroupCloseable extends NioEventLoopGroup implements Aut
     }
 
     @Override
-    public void close() throws Exception {
+    public void close() {
         shutdownGracefully(0, 1, TimeUnit.SECONDS);
     }
 
index 8786f3af0a177a0068196f31bc352248f7e51da5..e7b09159259e68c20c5bc74c9de8380056b28e2d 100644 (file)
@@ -25,7 +25,7 @@ public final class HashedWheelTimerCloseable implements AutoCloseable, Timer {
     }
 
     @Override
-    public void close() throws Exception {
+    public void close() {
         stop();
     }
 
index f416ed665c4c2daf7c8f4afa1af248f9a11b9f38..b89657a3bd13a895bd929c61c766211b211c7407 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.controller.config.threadpool.util;
 
 import com.google.common.base.Optional;
 import java.io.Closeable;
-import java.io.IOException;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -97,7 +96,7 @@ public class FlexibleThreadPoolWrapper implements ThreadPool, Closeable {
     }
 
     @Override
-    public void close() throws IOException {
+    public void close() {
         executor.shutdown();
     }
 
index 608d3a5dfd93263bb1986391108e6671a3dab0e4..3f5a6dd3756b06beb67b393a5a2dae43b7a98fe8 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.controller.config.threadpool.util;
 
 import com.google.common.base.Preconditions;
 import java.io.Closeable;
-import java.io.IOException;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.atomic.AtomicLong;
 import javax.annotation.concurrent.ThreadSafe;
@@ -37,7 +36,7 @@ public class NamingThreadPoolFactory implements ThreadFactory, Closeable {
     }
 
     @Override
-    public void close() throws IOException {
+    public void close() {
     }
 
     public String getNamePrefix() {
index 29e3df74f5657a9697731d4cdc60c526a8baf14d..7346ed0f0fffd94e3c69fac7e3d1a97c399ef756 100644 (file)
@@ -62,7 +62,7 @@ public final class LocalHistoryIdentifier implements WritableIdentifier {
         }
 
         @Override
-        public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
+        public void readExternal(final ObjectInput in) throws IOException {
             clientId = ClientIdentifier.readFrom(in);
 
             final byte header = WritableObjects.readLongHeader(in);
index a91828bc3d69b7f9b11051e87d21e8c066f64430..ccdc6753ac640600d972d4591ba8246814ae96d8 100644 (file)
@@ -33,12 +33,12 @@ public abstract class AbstractRequestFailureTest<T extends RequestFailure<?, T>>
     abstract T object();
 
     @Test
-    public void getCauseTest() throws Exception {
+    public void getCauseTest() {
         Assert.assertEquals(CAUSE, object().getCause());
     }
 
     @Test
-    public void isHardFailureTest() throws Exception {
+    public void isHardFailureTest() {
         Assert.assertTrue(object().isHardFailure());
     }
 
index e3750ae886853adcb53cc4c80c2e0ae8f77c3845..9900abe3885dbd94faa0921f4cd07f665b7a2076 100644 (file)
@@ -32,7 +32,7 @@ public class ClosedTransactionExceptionTest extends RequestExceptionTest<ClosedT
     }
 
     @Test
-    public void testIsSuccessful() throws Exception {
+    public void testIsSuccessful() {
         Assert.assertEquals(true, OBJECT.isSuccessful());
     }
 
index 38a678e52bb2c309d7c604227188f51df4ec5aed..6518102fa144189992ec263174de9e12aba8f12b 100644 (file)
@@ -20,7 +20,7 @@ public class ConnectClientFailureTest extends AbstractRequestFailureTest<Connect
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final ConnectClientFailure clone = OBJECT.cloneAsVersion(ABIVersion.current());
         Assert.assertEquals(OBJECT.getTarget(), clone.getTarget());
         Assert.assertEquals(OBJECT.getSequence(), clone.getSequence());
index 02832ae2848cdb4a1709d3c0ad50fa30bcc27637..64e4717e85aa15595968560f04089b9a5951779a 100644 (file)
@@ -36,31 +36,31 @@ public class ConnectClientRequestTest extends AbstractRequestTest<ConnectClientR
     }
 
     @Test
-    public void getMinVersionTest() throws Exception {
+    public void getMinVersionTest() {
         Assert.assertEquals(MIN_VERSION, OBJECT.getMinVersion());
     }
 
     @Test
-    public void getMaxVersionTest() throws Exception {
+    public void getMaxVersionTest() {
         Assert.assertEquals(MAX_VERSION, OBJECT.getMaxVersion());
     }
 
     @Test
-    public void toRequestFailureTest() throws Exception {
+    public void toRequestFailureTest() {
         final RequestException exception = new DeadTransactionException(ImmutableRangeSet.of());
         final ConnectClientFailure failure = OBJECT.toRequestFailure(exception);
         Assert.assertNotNull(failure);
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final ConnectClientRequest clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertNotNull(clone);
         Assert.assertEquals(ABIVersion.BORON, clone.getVersion());
     }
 
     @Test
-    public void addToStringAttributesTest() throws Exception {
+    public void addToStringAttributesTest() {
         final MoreObjects.ToStringHelper result = OBJECT.addToStringAttributes(MoreObjects.toStringHelper(OBJECT));
         Assert.assertTrue(result.toString().contains("minVersion=" + MIN_VERSION));
         Assert.assertTrue(result.toString().contains("maxVersion=" + MAX_VERSION));
index c7622bbcfb9dd1e1ac1d1392595c612a9eb69577..1dfe3c301bcba2b67470fddb57562cef9e44dc2c 100644 (file)
@@ -73,7 +73,7 @@ public class ConnectClientSuccessTest extends AbstractRequestSuccessTest<Connect
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final ConnectClientSuccess clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT, clone);
     }
index 1d6cb26e781bc341d3cfa501c80b0689ef398cc1..2682c9df5982f7cd56d80e3bd2def73968f5e76b 100644 (file)
@@ -21,7 +21,7 @@ public class ExistsTransactionRequestTest extends AbstractReadTransactionRequest
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final ABIVersion cloneVersion = ABIVersion.TEST_FUTURE_VERSION;
         final ExistsTransactionRequest clone = OBJECT.cloneAsVersion(cloneVersion);
         Assert.assertEquals(cloneVersion, clone.getVersion());
index aa68eaa859fed7230504263cb16da4a8c5a10a15..e5a74a63854811c9a5db5db20c37bcf38342c720 100644 (file)
@@ -24,19 +24,19 @@ public class ExistsTransactionSuccessTest extends AbstractTransactionSuccessTest
     }
 
     @Test
-    public void getExistsTest() throws Exception {
+    public void getExistsTest() {
         final boolean result = OBJECT.getExists();
         Assert.assertEquals(EXISTS, result);
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final ExistsTransactionSuccess clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT, clone);
     }
 
     @Test
-    public void addToStringAttributesTest() throws Exception {
+    public void addToStringAttributesTest() {
         final MoreObjects.ToStringHelper result = OBJECT.addToStringAttributes(MoreObjects.toStringHelper(OBJECT));
         Assert.assertTrue(result.toString().contains("exists=" + EXISTS));
     }
index a1da0ecba817df880ed7377a15f9b9f89b7e0bf4..c9d76f9b3d4591947978cf2f27e4bd8361285f98 100644 (file)
@@ -20,7 +20,7 @@ public class LocalHistoryFailureTest extends AbstractRequestFailureTest<LocalHis
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final LocalHistoryFailure clone = OBJECT.cloneAsVersion(ABIVersion.current());
         Assert.assertEquals(OBJECT, clone);
     }
index 219f9144b2b6495fc4eb94daea6a2982aaa361a7..635384304b41d2ee2fc59fb05de410533e743029 100644 (file)
@@ -22,7 +22,7 @@ public class LocalHistorySuccessTest extends AbstractRequestSuccessTest<LocalHis
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final LocalHistorySuccess clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT.getSequence(), clone.getSequence());
         Assert.assertEquals(OBJECT.getTarget(), clone.getTarget());
index 7733f3447bc50746d8af0288e324bbf0442f8410..a546e2819454a781e608073ec726e5bcf8a625b0 100644 (file)
@@ -44,20 +44,20 @@ public class ModifyTransactionRequestBuilderTest {
             new ModifyTransactionRequestBuilder(transactionIdentifier, actorRef);
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         modifyTransactionRequestBuilder.setSequence(0L);
         modifyTransactionRequestBuilder.addModification(transactionModification);
         assertEquals(1, modifyTransactionRequestBuilder.size());
     }
 
     @Test
-    public void testGetIdentifier() throws Exception {
+    public void testGetIdentifier() {
         final TransactionIdentifier identifier = modifyTransactionRequestBuilder.getIdentifier();
         Assert.assertEquals(transactionIdentifier, identifier);
     }
 
     @Test
-    public void testBuildReady() throws Exception {
+    public void testBuildReady() {
         modifyTransactionRequestBuilder.setReady();
         final ModifyTransactionRequest modifyTransactionRequest = modifyTransactionRequestBuilder.build();
         Assert.assertEquals(PersistenceProtocol.READY, modifyTransactionRequest.getPersistenceProtocol().get());
@@ -65,7 +65,7 @@ public class ModifyTransactionRequestBuilderTest {
     }
 
     @Test
-    public void testBuildAbort() throws Exception {
+    public void testBuildAbort() {
         modifyTransactionRequestBuilder.setAbort();
         final ModifyTransactionRequest modifyTransactionRequest = modifyTransactionRequestBuilder.build();
         Assert.assertEquals(PersistenceProtocol.ABORT, modifyTransactionRequest.getPersistenceProtocol().get());
@@ -73,14 +73,14 @@ public class ModifyTransactionRequestBuilderTest {
     }
 
     @Test
-    public void testBuildCommitTrue() throws Exception {
+    public void testBuildCommitTrue() {
         modifyTransactionRequestBuilder.setCommit(true);
         final ModifyTransactionRequest modifyTransactionRequest = modifyTransactionRequestBuilder.build();
         Assert.assertEquals(PersistenceProtocol.THREE_PHASE, modifyTransactionRequest.getPersistenceProtocol().get());
     }
 
     @Test
-    public void testBuildCommitFalse() throws Exception {
+    public void testBuildCommitFalse() {
         modifyTransactionRequestBuilder.setCommit(false);
         final ModifyTransactionRequest modifyTransactionRequest = modifyTransactionRequestBuilder.build();
         Assert.assertEquals(PersistenceProtocol.SIMPLE, modifyTransactionRequest.getPersistenceProtocol().get());
index 099567f5efd54a38b22c21148269ac9418c5dad7..3f284e8fc4069ab7911d0368fa01d866528572f6 100644 (file)
@@ -27,14 +27,14 @@ public class ModifyTransactionRequestEmptyTest extends AbstractTransactionReques
     }
 
     @Test
-    public void getPersistenceProtocolTest() throws Exception {
+    public void getPersistenceProtocolTest() {
         final Optional<PersistenceProtocol> result = OBJECT.getPersistenceProtocol();
         Assert.assertTrue(result.isPresent());
         Assert.assertEquals(PROTOCOL, result.get());
     }
 
     @Test
-    public void getModificationsTest() throws Exception {
+    public void getModificationsTest() {
         final List<TransactionModification> result = OBJECT.getModifications();
         Assert.assertNotNull(result);
         Assert.assertTrue(result.isEmpty());
@@ -48,7 +48,7 @@ public class ModifyTransactionRequestEmptyTest extends AbstractTransactionReques
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final ModifyTransactionRequest clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT, clone);
     }
index 4e32c4a8537d2ce7dbc2c75b97884ba5df74fff5..8aef2747576781162e77b38294ff967340df2fd4 100644 (file)
@@ -39,14 +39,14 @@ public class ModifyTransactionRequestTest extends AbstractTransactionRequestTest
     }
 
     @Test
-    public void getPersistenceProtocolTest() throws Exception {
+    public void getPersistenceProtocolTest() {
         final Optional<PersistenceProtocol> result = OBJECT.getPersistenceProtocol();
         Assert.assertTrue(result.isPresent());
         Assert.assertEquals(PROTOCOL, result.get());
     }
 
     @Test
-    public void getModificationsTest() throws Exception {
+    public void getModificationsTest() {
         final List<TransactionModification> result = OBJECT.getModifications();
         Assert.assertNotNull(result);
         Assert.assertEquals(MODIFICATIONS, result);
@@ -60,7 +60,7 @@ public class ModifyTransactionRequestTest extends AbstractTransactionRequestTest
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final ModifyTransactionRequest clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT, clone);
     }
index c31caf28a0754ccaf2c8267596f22d765ee5bcda..3756a8a2525825d0f47cae778d0713d497a394a0 100644 (file)
@@ -21,7 +21,7 @@ public class ModifyTransactionSuccessTest extends AbstractTransactionSuccessTest
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final ModifyTransactionSuccess clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT.getVersion(), clone.getVersion());
         Assert.assertEquals(OBJECT.getSequence(), clone.getSequence());
index ab1e1bbbd7de24c1f32fb56cfacc9cff667613d1..c4096833ca282f88c19b97791c8bb3986f1cb9b7 100644 (file)
@@ -21,7 +21,7 @@ public class ReadTransactionRequestTest extends AbstractReadTransactionRequestTe
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final ABIVersion cloneVersion = ABIVersion.TEST_FUTURE_VERSION;
         final ReadTransactionRequest clone = OBJECT.cloneAsVersion(cloneVersion);
         Assert.assertEquals(cloneVersion, clone.getVersion());
index a24539fea511b3dce15beba048c299af55bbe2c5..0a56e822a332fc9aa3adf241f5edef7902f8449a 100644 (file)
@@ -23,13 +23,13 @@ public class ReadTransactionSuccessNoDataTest extends AbstractTransactionSuccess
     }
 
     @Test
-    public void getDataTest() throws Exception {
+    public void getDataTest() {
         final Optional<NormalizedNode<?, ?>> result = OBJECT.getData();
         Assert.assertFalse(result.isPresent());
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final ReadTransactionSuccess clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT, clone);
     }
index 812a366e69388665c1ae2aec5a9d4567214c3a1e..a50dc5d50cd7c19c999fea7a920ea0abaf879375 100644 (file)
@@ -29,14 +29,14 @@ public class ReadTransactionSuccessTest extends AbstractTransactionSuccessTest<R
     }
 
     @Test
-    public void getDataTest() throws Exception {
+    public void getDataTest() {
         final Optional<NormalizedNode<?, ?>> result = OBJECT.getData();
         Assert.assertTrue(result.isPresent());
         Assert.assertEquals(NODE.getValue(), result.get().getValue());
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final ReadTransactionSuccess clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT, clone);
     }
index 1478579c7ef2e07e455a723ba1199fc399c5e437..9c7dbf11d729bdc97eb05f64a23258e8b3bf1c9b 100644 (file)
@@ -21,7 +21,7 @@ public class TransactionAbortRequestTest extends AbstractTransactionRequestTest<
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final TransactionAbortRequest clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT, clone);
     }
index 10904d18cf21db79009125703acf58a202827ac8..31959aaf3e18022be887cfb9f645ad1d6f730b25 100644 (file)
@@ -21,7 +21,7 @@ public class TransactionAbortSuccessTest extends AbstractTransactionSuccessTest<
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final TransactionAbortSuccess clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT, clone);
     }
index 7bfea5705d6556192f168eafb4fc0e3340290532..e8995a9e24737a3f35a9f99407725d40122e2048 100644 (file)
@@ -21,7 +21,7 @@ public class TransactionCanCommitSuccessTest extends AbstractTransactionSuccessT
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final TransactionCanCommitSuccess clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT, clone);
     }
index fe4afff51099093548aba1733e343ffb5132843b..9db578d2b6d82e2f444c44da9812716e57196ff2 100644 (file)
@@ -21,7 +21,7 @@ public class TransactionCommitSuccessTest extends AbstractTransactionSuccessTest
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final TransactionCommitSuccess clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT, clone);
     }
index 9c6b1fb259cd7c8c0cf04963ac41c0f8ec47443b..26f1a379bbef7cf1e89f38e321fee0831f606a6f 100644 (file)
@@ -21,7 +21,7 @@ public class TransactionDoCommitRequestTest extends AbstractTransactionRequestTe
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final TransactionDoCommitRequest clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT, clone);
     }
index 6adeaae4ab6dc0301ae47642655134eb6e3a487a..9e8467e5ca3425d381d0d03777f3c24a97316bf1 100644 (file)
@@ -20,7 +20,7 @@ public class TransactionFailureTest extends AbstractRequestFailureTest<Transacti
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final TransactionFailure clone = OBJECT.cloneAsVersion(ABIVersion.current());
         Assert.assertEquals(OBJECT, clone);
     }
index 9bc9b68c2ffa7c672a10245ab0f3e3c60f0a89f5..ceac8606b87b55ed9063f08e350e35aef68ad612 100644 (file)
@@ -21,7 +21,7 @@ public class TransactionPreCommitRequestTest extends AbstractTransactionRequestT
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final TransactionPreCommitRequest clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT, clone);
     }
index 18d530a5b96772a9efd63ddf92885ff87e713102..0130ea06ab8c515297854604452c64d73f29016b 100644 (file)
@@ -21,7 +21,7 @@ public class TransactionPreCommitSuccessTest extends AbstractTransactionSuccessT
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final TransactionPreCommitSuccess clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT, clone);
     }
index 22266e2930d8dc96ade745a7daf0e568c6c2d950..5ae9f26dbf5605aa6239a8eea8099979086378f5 100644 (file)
@@ -21,7 +21,7 @@ public class TransactionPurgeRequestTest extends AbstractTransactionRequestTest<
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final TransactionPurgeRequest clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT, clone);
     }
index 2e71360cf9cb80388b8cd35ee995fb54fc0704d9..bef9ae140bde60e9d8b13f5704e6b6964da743cf 100644 (file)
@@ -21,7 +21,7 @@ public class TransactionPurgeResponseTest extends AbstractTransactionSuccessTest
     }
 
     @Test
-    public void cloneAsVersionTest() throws Exception {
+    public void cloneAsVersionTest() {
         final TransactionPurgeResponse clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
         Assert.assertEquals(OBJECT, clone);
     }
index 3f56f080600099bae49d3122e9ed8194ef091faa..f0f5d3d26c56a7c557bd74e21dd294b620feaada 100644 (file)
@@ -27,7 +27,7 @@ public abstract class AbstractEnvelopeTest<E extends Envelope<?>> {
     }
 
     @Test
-    public void testProxySerializationDeserialization() throws Exception {
+    public void testProxySerializationDeserialization() {
         final byte[] serializedBytes = SerializationUtils.serialize(envelope);
         final Object deserialize = SerializationUtils.deserialize(serializedBytes);
         checkDeserialized((E) deserialize);
index 43ffa19c49e38661182849de606592df1bde79b1..e14bf766a244add8ff171ebf37c2b3da59ed227d 100644 (file)
@@ -43,7 +43,7 @@ public class FrontendTypeTest extends AbstractIdentifierTest<FrontendType> {
     }
 
     @Test
-    public void testCompareTo() throws Exception {
+    public void testCompareTo() {
         Assert.assertTrue(object().compareTo(equalObject()) == 0);
         Assert.assertTrue(object().compareTo(differentObject()) < 0);
     }
index d270a0c42387751b1d35d90781cea499ec1f7f3d..b63dc4c78c741d514a097d2c7bf01b2eb7000166 100644 (file)
@@ -57,7 +57,7 @@ public class RequestEnvelopeTest extends AbstractEnvelopeTest<RequestEnvelope> {
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         system.terminate();
     }
 }
\ No newline at end of file
index 7784a218f1b063f6d67377a1180ce7d12ed344e5..59930ca024794c6351baa25b23cc761e5d98ece2 100644 (file)
@@ -60,7 +60,7 @@ public abstract class AbstractClientConnectionTest<T extends AbstractClientConne
     protected TestProbe replyToProbe;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
         system = ActorSystem.apply();
         backendProbe = new TestProbe(system);
@@ -74,15 +74,15 @@ public abstract class AbstractClientConnectionTest<T extends AbstractClientConne
     protected abstract T createConnection();
 
     @Test
-    public void testLocalActor() throws Exception {
+    public void testLocalActor() {
         Assert.assertEquals(contextProbe.ref(), connection.localActor());
     }
 
     @Test
-    public abstract void testReconnectConnection() throws Exception;
+    public abstract void testReconnectConnection();
 
     @Test
-    public void testPoison() throws Exception {
+    public void testPoison() {
         final Consumer<Response<?, ?>> callback = mock(Consumer.class);
         final Request<?, ?> request = createRequest(replyToProbe.ref());
         final ConnectionEntry entry = new ConnectionEntry(request, callback, 0L);
@@ -92,7 +92,7 @@ public abstract class AbstractClientConnectionTest<T extends AbstractClientConne
     }
 
     @Test
-    public void testSendRequestReceiveResponse() throws Exception {
+    public void testSendRequestReceiveResponse() {
         final Consumer<Response<?, ?>> callback = mock(Consumer.class);
         final Request<?, ?> request = createRequest(replyToProbe.ref());
         connection.sendRequest(request, callback);
@@ -106,19 +106,19 @@ public abstract class AbstractClientConnectionTest<T extends AbstractClientConne
     }
 
     @Test
-    public void testRun() throws Exception {
+    public void testRun() {
         final ClientActorBehavior<U> behavior = mock(ClientActorBehavior.class);
         Assert.assertSame(behavior, connection.runTimer(behavior));
     }
 
     @Test
-    public void testCheckTimeoutEmptyQueue() throws Exception {
+    public void testCheckTimeoutEmptyQueue() {
         final Optional<Long> timeout = connection.checkTimeout(context.ticker().read());
         Assert.assertFalse(timeout.isPresent());
     }
 
     @Test
-    public void testCheckTimeout() throws Exception {
+    public void testCheckTimeout() {
         final Consumer<Response<?, ?>> callback = mock(Consumer.class);
         connection.sendRequest(createRequest(replyToProbe.ref()), callback);
         final long now = context.ticker().read();
@@ -127,7 +127,7 @@ public abstract class AbstractClientConnectionTest<T extends AbstractClientConne
     }
 
     @Test
-    public void testReplay() throws Exception {
+    public void testReplay() {
         final Consumer<Response<?, ?>> callback = mock(Consumer.class);
         final Request<?, ?> request1 = createRequest(replyToProbe.ref());
         final Request<?, ?> request2 = createRequest(replyToProbe.ref());
@@ -142,7 +142,7 @@ public abstract class AbstractClientConnectionTest<T extends AbstractClientConne
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 
index 464acdcea8887f5cb37dff931af21f2024e5d6b9..69788e5da124327760ba5b63388101ab79a00104 100644 (file)
@@ -55,25 +55,25 @@ public abstract class AbstractTransmitQueueTest<T extends TransmitQueue> {
     protected abstract T createQueue();
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         system = ActorSystem.apply();
         probe = new TestProbe(system);
         queue = createQueue();
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 
     @Test
-    public abstract void testCanTransmitCount() throws Exception;
+    public abstract void testCanTransmitCount();
 
     @Test(expected = UnsupportedOperationException.class)
-    public abstract void testTransmit() throws Exception;
+    public abstract void testTransmit();
 
     @Test
-    public void testAsIterable() throws Exception {
+    public void testAsIterable() {
         final Request<?, ?> request = new TransactionPurgeRequest(TRANSACTION_IDENTIFIER, 0L, probe.ref());
         final Consumer<Response<?, ?>> callback = createConsumerMock();
         final long now = Ticker.systemTicker().read();
@@ -87,13 +87,13 @@ public abstract class AbstractTransmitQueueTest<T extends TransmitQueue> {
     }
 
     @Test
-    public void testTicksStalling() throws Exception {
+    public void testTicksStalling() {
         final long now = Ticker.systemTicker().read();
         Assert.assertEquals(0, queue.ticksStalling(now));
     }
 
     @Test
-    public void testCompleteReponseNotMatchingRequest() throws Exception {
+    public void testCompleteReponseNotMatchingRequest() {
         final long requestSequence = 0L;
         final long txSequence = 0L;
         final long sessionId = 0L;
@@ -131,7 +131,7 @@ public abstract class AbstractTransmitQueueTest<T extends TransmitQueue> {
     }
 
     @Test
-    public void testIsEmpty() throws Exception {
+    public void testIsEmpty() {
         Assert.assertTrue(queue.isEmpty());
         final Request<?, ?> request = new TransactionPurgeRequest(TRANSACTION_IDENTIFIER, 0L, probe.ref());
         final Consumer<Response<?, ?>> callback = createConsumerMock();
@@ -141,7 +141,7 @@ public abstract class AbstractTransmitQueueTest<T extends TransmitQueue> {
     }
 
     @Test
-    public void testPeek() throws Exception {
+    public void testPeek() {
         final Request<?, ?> request1 = new TransactionPurgeRequest(TRANSACTION_IDENTIFIER, 0L, probe.ref());
         final Request<?, ?> request2 = new TransactionPurgeRequest(TRANSACTION_IDENTIFIER, 1L, probe.ref());
         final Consumer<Response<?, ?>> callback = createConsumerMock();
@@ -154,7 +154,7 @@ public abstract class AbstractTransmitQueueTest<T extends TransmitQueue> {
     }
 
     @Test
-    public void testPoison() throws Exception {
+    public void testPoison() {
         final Request<?, ?> request = new TransactionPurgeRequest(TRANSACTION_IDENTIFIER, 0L, probe.ref());
         final Consumer<Response<?, ?>> callback = createConsumerMock();
         final long now = Ticker.systemTicker().read();
index 82544657fd03ac75011cc4b2623938a856e9ba36..793b0b48fb0285bf737a08883966ae0a3db515fa 100644 (file)
@@ -62,12 +62,12 @@ public class ActorBehaviorTest {
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 
     @Test
-    public void testInitialBehavior() throws Exception {
+    public void testInitialBehavior() {
         final InternalCommand<BackendInfo> cmd = mock(InternalCommand.class);
         when(cmd.execute(any())).thenReturn(initialBehavior);
         mockedActor.tell(cmd, ActorRef.noSender());
@@ -75,7 +75,7 @@ public class ActorBehaviorTest {
     }
 
     @Test
-    public void testCommandStashing() throws Exception {
+    public void testCommandStashing() {
         system.stop(mockedActor);
         mockedActor = system.actorOf(MockedActor.props(id, initialBehavior));
         final InternalCommand<BackendInfo> cmd = mock(InternalCommand.class);
@@ -90,7 +90,7 @@ public class ActorBehaviorTest {
     }
 
     @Test
-    public void testRecoveryAfterRestart() throws Exception {
+    public void testRecoveryAfterRestart() {
         system.stop(mockedActor);
         mockedActor = system.actorOf(MockedActor.props(id, initialBehavior));
         final MockedSnapshotStore.SaveRequest newSaveRequest =
@@ -99,7 +99,7 @@ public class ActorBehaviorTest {
     }
 
     @Test
-    public void testRecoveryAfterRestartFrontendIdMismatch() throws Exception {
+    public void testRecoveryAfterRestartFrontendIdMismatch() {
         system.stop(mockedActor);
         //start actor again
         mockedActor = system.actorOf(MockedActor.props(id, initialBehavior));
@@ -116,7 +116,7 @@ public class ActorBehaviorTest {
     }
 
     @Test
-    public void testRecoveryAfterRestartSaveSnapshotFail() throws Exception {
+    public void testRecoveryAfterRestartSaveSnapshotFail() {
         system.stop(mockedActor);
         mockedActor = system.actorOf(MockedActor.props(id, initialBehavior));
         probe.watch(mockedActor);
@@ -129,7 +129,7 @@ public class ActorBehaviorTest {
     }
 
     @Test
-    public void testRecoveryAfterRestartDeleteSnapshotsFail() throws Exception {
+    public void testRecoveryAfterRestartDeleteSnapshotsFail() {
         system.stop(mockedActor);
         mockedActor = system.actorOf(MockedActor.props(id, initialBehavior));
         probe.watch(mockedActor);
index 4dcbccbfb859d030b8313c3480c614a7302c4d4d..e8ac87fb962af145efc73ae8ee9c2a0f0352b407 100644 (file)
@@ -62,20 +62,20 @@ public class ClientActorContextTest {
     }
 
     @Test
-    public void testExecuteInActor() throws Exception {
+    public void testExecuteInActor() {
         ctx.executeInActor(command);
         probe.expectMsg(command);
     }
 
     @Test
-    public void testExecuteInActorScheduled() throws Exception {
+    public void testExecuteInActorScheduled() {
         final FiniteDuration delay = Duration.apply(1, TimeUnit.SECONDS);
         ctx.executeInActor(command, delay);
         probe.expectMsg(command);
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 }
index 61d93e4ebe2611c28a04795203d8f6c449e844d9..226c173e8d8a459825e996597308bfa2522acbba 100644 (file)
@@ -34,7 +34,7 @@ public class ConnectedClientConnectionTest
         extends AbstractClientConnectionTest<ConnectedClientConnection<BackendInfo>, BackendInfo> {
 
     @Test
-    public void testCheckTimeoutConnectionTimedout() throws Exception {
+    public void testCheckTimeoutConnectionTimedout() {
         final Consumer<Response<?, ?>> callback = mock(Consumer.class);
         connection.sendRequest(createRequest(replyToProbe.ref()), callback);
         final long now = context.ticker().read() + ConnectedClientConnection.DEFAULT_BACKEND_ALIVE_TIMEOUT_NANOS;
@@ -51,7 +51,7 @@ public class ConnectedClientConnectionTest
 
     @Override
     @Test
-    public void testReconnectConnection() throws Exception {
+    public void testReconnectConnection() {
         final ClientActorBehavior<BackendInfo> behavior = mock(ClientActorBehavior.class);
         connection.lockedReconnect(behavior, mock(RequestException.class));
         verify(behavior).reconnectConnection(same(connection), any(ReconnectingClientConnection.class));
index 88e50e2f48f526f003f00bf2a48ea010bc22750d..911f34996329ba44f7cb7937bfa1aa6816b4c0c7 100644 (file)
@@ -221,14 +221,14 @@ public class ConnectingClientConnectionTest {
     }
 
     @Test
-    public void testRunTimeoutEmpty() throws NoProgressException {
+    public void testRunTimeoutEmpty() {
         Optional<Long> ret = queue.checkTimeout(ticker.read());
         assertNotNull(ret);
         assertFalse(ret.isPresent());
     }
 
     @Test
-    public void testRunTimeoutWithoutShift() throws NoProgressException {
+    public void testRunTimeoutWithoutShift() {
         queue.sendRequest(mockRequest, mockCallback);
         Optional<Long> ret = queue.checkTimeout(ticker.read());
         assertNotNull(ret);
@@ -236,7 +236,7 @@ public class ConnectingClientConnectionTest {
     }
 
     @Test
-    public void testRunTimeoutWithTimeoutLess() throws NoProgressException {
+    public void testRunTimeoutWithTimeoutLess() {
         queue.sendRequest(mockRequest, mockCallback);
 
         ticker.advance(AbstractClientConnection.DEFAULT_BACKEND_ALIVE_TIMEOUT_NANOS - 1);
@@ -247,7 +247,7 @@ public class ConnectingClientConnectionTest {
     }
 
     @Test
-    public void testRunTimeoutWithTimeoutExact() throws NoProgressException {
+    public void testRunTimeoutWithTimeoutExact() {
         setupBackend();
 
         queue.sendRequest(mockRequest, mockCallback);
@@ -259,7 +259,7 @@ public class ConnectingClientConnectionTest {
     }
 
     @Test
-    public void testRunTimeoutWithTimeoutMore() throws NoProgressException {
+    public void testRunTimeoutWithTimeoutMore() {
         setupBackend();
 
         queue.sendRequest(mockRequest, mockCallback);
@@ -271,7 +271,7 @@ public class ConnectingClientConnectionTest {
     }
 
     @SuppressWarnings({ "rawtypes", "unchecked" })
-    public void testRunTimeoutWithoutProgressExact() throws NoProgressException {
+    public void testRunTimeoutWithoutProgressExact() {
         queue.sendRequest(mockRequest, mockCallback);
 
         ticker.advance(AbstractClientConnection.DEFAULT_NO_PROGRESS_TIMEOUT_NANOS);
@@ -282,7 +282,7 @@ public class ConnectingClientConnectionTest {
     }
 
     @SuppressWarnings({ "rawtypes", "unchecked" })
-    public void testRunTimeoutWithoutProgressMore() throws NoProgressException {
+    public void testRunTimeoutWithoutProgressMore() {
         queue.sendRequest(mockRequest, mockCallback);
 
         ticker.advance(AbstractClientConnection.DEFAULT_NO_PROGRESS_TIMEOUT_NANOS + 1);
@@ -293,7 +293,7 @@ public class ConnectingClientConnectionTest {
     }
 
     @Test
-    public void testRunTimeoutEmptyWithoutProgressExact() throws NoProgressException {
+    public void testRunTimeoutEmptyWithoutProgressExact() {
         ticker.advance(AbstractClientConnection.DEFAULT_NO_PROGRESS_TIMEOUT_NANOS);
 
         // No problem
@@ -303,7 +303,7 @@ public class ConnectingClientConnectionTest {
     }
 
     @Test
-    public void testRunTimeoutEmptyWithoutProgressMore() throws NoProgressException {
+    public void testRunTimeoutEmptyWithoutProgressMore() {
         ticker.advance(AbstractClientConnection.DEFAULT_NO_PROGRESS_TIMEOUT_NANOS + 1);
 
         // No problem
@@ -344,7 +344,7 @@ public class ConnectingClientConnectionTest {
     }
 
     @Test
-    public void testProgressRecord() throws NoProgressException {
+    public void testProgressRecord() {
         setupBackend();
 
         queue.sendRequest(mockRequest, mockCallback);
index 4251c87f595338f9427b34c7a4f3624beff9da6c..cca9477b735e9e8059ba77c3315ea96ab360d3fb 100644 (file)
@@ -29,13 +29,13 @@ public class HaltedTransmitQueueTest extends AbstractTransmitQueueTest<TransmitQ
 
     @Test
     @Override
-    public void testCanTransmitCount() throws Exception {
+    public void testCanTransmitCount() {
         Assert.assertFalse(queue.canTransmitCount(0) > 0);
     }
 
     @Test(expected = UnsupportedOperationException.class)
     @Override
-    public void testTransmit() throws Exception {
+    public void testTransmit() {
         final Request<?, ?> request = new TransactionPurgeRequest(TRANSACTION_IDENTIFIER, 0L, probe.ref());
         final Consumer<Response<?, ?>> callback = createConsumerMock();
         final long now = Ticker.systemTicker().read();
index 56b3f54ac9807939e314abd48adba3b06d7d3656..51e99d60c0e1259d60d768128455134804c77942 100644 (file)
@@ -22,18 +22,18 @@ public class InversibleLockTest {
     private ScheduledExecutorService executor;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         lock = new InversibleLock();
         executor = Executors.newScheduledThreadPool(1);
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         executor.shutdownNow();
     }
 
     @Test(timeout = 2000)
-    public void testWriteLockUnlock() throws Exception {
+    public void testWriteLockUnlock() {
         final long stamp = lock.writeLock();
         Assert.assertTrue(lock.validate(stamp));
         executor.schedule(() -> lock.unlockWrite(stamp), 500, TimeUnit.MILLISECONDS);
@@ -45,7 +45,7 @@ public class InversibleLockTest {
     }
 
     @Test
-    public void testLockAfterRead() throws Exception {
+    public void testLockAfterRead() {
         final long readStamp = lock.optimisticRead();
         lock.writeLock();
         Assert.assertFalse(lock.validate(readStamp));
index 0071a0b24b6eb73fde9b0d7c6e01444c64d568f2..3e26ae92cdc50ad1f5d0e6b540780e17d6696bc5 100644 (file)
@@ -76,7 +76,7 @@ class MockedSnapshotStore extends SnapshotStore {
         final Promise<T> promise = new scala.concurrent.impl.Promise.DefaultPromise<>();
         future.onComplete(new OnComplete<Object>() {
             @Override
-            public void onComplete(final Throwable failure, final Object success) throws Throwable {
+            public void onComplete(final Throwable failure, final Object success) {
                 if (success instanceof Throwable) {
                     promise.failure((Throwable) success);
                     return;
index 679430cb71eb2e276a5f9e5a65f40e9c1a615af4..8ce7530bb0207255d91cad4a692ec1e2124d19bf 100644 (file)
@@ -31,7 +31,7 @@ public class ReconnectingClientConnectionTest
         extends AbstractClientConnectionTest<ReconnectingClientConnection<BackendInfo>, BackendInfo> {
 
     @Test
-    public void testCheckTimeoutConnectionTimedout() throws Exception {
+    public void testCheckTimeoutConnectionTimedout() {
         final Consumer<Response<?, ?>> callback = mock(Consumer.class);
         connection.sendRequest(createRequest(replyToProbe.ref()), callback);
         final long now = context.ticker().read() + ConnectedClientConnection.DEFAULT_BACKEND_ALIVE_TIMEOUT_NANOS;
@@ -51,14 +51,14 @@ public class ReconnectingClientConnectionTest
 
     @Override
     @Test
-    public void testReconnectConnection() throws Exception {
+    public void testReconnectConnection() {
         final ClientActorBehavior<BackendInfo> behavior = mock(ClientActorBehavior.class);
         Assert.assertSame(behavior, connection.lockedReconnect(behavior, mock(RequestException.class)));
     }
 
     @Override
     @Test
-    public void testSendRequestReceiveResponse() throws Exception {
+    public void testSendRequestReceiveResponse() {
         final Consumer<Response<?, ?>> callback = mock(Consumer.class);
         final Request<?, ?> request = createRequest(replyToProbe.ref());
         connection.sendRequest(request, callback);
index b6636553ffa661b9b4dd48411d61f75f7090a76c..8db4803c43c9bec7b43c94b6ee7ec100d163a41e 100644 (file)
@@ -69,7 +69,7 @@ public class TransmittingTransmitQueueTest extends AbstractTransmitQueueTest<Tra
     }
 
     @Test
-    public void testComplete() throws Exception {
+    public void testComplete() {
         final long sequence1 = 0L;
         final long sequence2 = 1L;
         final Request<?, ?> request1 = new TransactionPurgeRequest(TRANSACTION_IDENTIFIER, sequence1, probe.ref());
@@ -102,7 +102,7 @@ public class TransmittingTransmitQueueTest extends AbstractTransmitQueueTest<Tra
     }
 
     @Test
-    public void testEnqueueCanTransmit() throws Exception {
+    public void testEnqueueCanTransmit() {
         final Request<?, ?> request = new TransactionPurgeRequest(TRANSACTION_IDENTIFIER, 0L, probe.ref());
         final Consumer<Response<?, ?>> callback = createConsumerMock();
         final long now = now();
@@ -112,7 +112,7 @@ public class TransmittingTransmitQueueTest extends AbstractTransmitQueueTest<Tra
     }
 
     @Test
-    public void testEnqueueBackendFull() throws Exception {
+    public void testEnqueueBackendFull() {
         final Request<?, ?> request = new TransactionPurgeRequest(TRANSACTION_IDENTIFIER, 0L, probe.ref());
         final Consumer<Response<?, ?>> callback = createConsumerMock();
         final long now = now();
@@ -131,14 +131,14 @@ public class TransmittingTransmitQueueTest extends AbstractTransmitQueueTest<Tra
 
     @Test
     @Override
-    public void testCanTransmitCount() throws Exception {
+    public void testCanTransmitCount() {
         assertTrue(queue.canTransmitCount(getMaxInFlightMessages() - 1) > 0);
         assertFalse(queue.canTransmitCount(getMaxInFlightMessages()) > 0);
     }
 
     @Test
     @Override
-    public void testTransmit() throws Exception {
+    public void testTransmit() {
         final Request<?, ?> request = new TransactionPurgeRequest(TRANSACTION_IDENTIFIER, 0L, probe.ref());
         final Consumer<Response<?, ?>> callback = createConsumerMock();
         final long now = now();
@@ -158,7 +158,7 @@ public class TransmittingTransmitQueueTest extends AbstractTransmitQueueTest<Tra
     }
 
     @Test
-    public void testSetForwarder() throws Exception {
+    public void testSetForwarder() {
         final FakeTicker ticker = new FakeTicker();
         ticker.setAutoIncrementStep(1, TimeUnit.MICROSECONDS);
         final Request<?, ?> request = new TransactionPurgeRequest(TRANSACTION_IDENTIFIER, 0L, probe.ref());
@@ -222,7 +222,7 @@ public class TransmittingTransmitQueueTest extends AbstractTransmitQueueTest<Tra
     }
 
     @Test
-    public void testRequestSlicingOnTransmit() throws Exception {
+    public void testRequestSlicingOnTransmit() {
         doReturn(true).when(mockMessageSlicer).slice(any());
 
         ModifyTransactionRequestBuilder reqBuilder = new ModifyTransactionRequestBuilder(
@@ -248,7 +248,7 @@ public class TransmittingTransmitQueueTest extends AbstractTransmitQueueTest<Tra
     }
 
     @Test
-    public void testSlicingFailureOnTransmit() throws Exception {
+    public void testSlicingFailureOnTransmit() {
         doAnswer(invocation -> {
             invocation.getArgumentAt(0, SliceOptions.class).getOnFailureCallback().accept(new Exception("mock"));
             return Boolean.FALSE;
@@ -269,7 +269,7 @@ public class TransmittingTransmitQueueTest extends AbstractTransmitQueueTest<Tra
     }
 
     @Test
-    public void testSlicedRequestOnComplete() throws Exception {
+    public void testSlicedRequestOnComplete() {
         doReturn(true).when(mockMessageSlicer).slice(any());
 
         ModifyTransactionRequestBuilder reqBuilder = new ModifyTransactionRequestBuilder(
index 7694cebbac1d74aff07ce87d92af4d3ceb9f95f2..a1d79a79f1ad5a3cbfee6a34bf2504f70ae7a0ef 100644 (file)
@@ -33,7 +33,7 @@ public class PrintOpenTransactionsCommand implements Action {
 
     @Override
     @SuppressWarnings("checkstyle:RegexpSingleLineJava")
-    public Object execute() throws Exception {
+    public Object execute() {
         for (TracingDOMDataBroker tracingDOMDataBroker : tracingDOMDataBrokers) {
             tracingDOMDataBroker.printOpenTransactions(System.out);
         }
index 6649aa82de7d08948cab9e9a60d990bb3d58a693..497e20e8218636027feaf7832d9775a62f22316b 100644 (file)
@@ -23,11 +23,11 @@ public class EventSourceRegistrationImplTest {
     EventSourceTopology eventSourceTopologyMock;
 
     @BeforeClass
-    public static void initTestClass() throws IllegalAccessException, InstantiationException {
+    public static void initTestClass() {
     }
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         EventSource eventSourceMock = mock(EventSource.class);
         eventSourceTopologyMock = mock(EventSourceTopology.class);
         eventSourceRegistrationImplLocal = new EventSourceRegistrationImplLocal(eventSourceMock,
index 72b26980475244a824f4cfaf6153837bd6b29795..3c3b2b56e78ff7279615bec35b67f0e4e8d4d800 100644 (file)
@@ -48,11 +48,11 @@ public class EventSourceTopicTest {
     EventSourceTopology eventSourceTopologyMock;
 
     @BeforeClass
-    public static void initTestClass() throws IllegalAccessException, InstantiationException {
+    public static void initTestClass() {
     }
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         final NotificationPattern notificationPattern = new NotificationPattern("value1");
         eventSourceServiceMock = mock(EventSourceService.class);
         doReturn(RpcResultBuilder.success(new JoinTopicOutputBuilder().setStatus(JoinTopicStatus.Up).build())
index fda32a6adee1da1ccbd12a820bdc67867159c299..8eb46e169c572bfe00258837259a99056240d8d6 100644 (file)
@@ -61,7 +61,7 @@ public class EventSourceTopologyTest {
     RpcRegistration<EventAggregatorService> aggregatorRpcReg;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         dataBrokerMock = mock(DataBroker.class);
         rpcProviderRegistryMock = mock(RpcProviderRegistry.class);
     }
index eba02a81cab985ff559f58bf9be92f8b41b8b5f0..a366c6963f27cff58795dfb5e268da5ead16cf65 100644 (file)
@@ -26,11 +26,11 @@ public class TopicDOMNotificationTest {
     TopicDOMNotification topicDOMNotification;
 
     @BeforeClass
-    public static void initTestClass() throws IllegalAccessException, InstantiationException {
+    public static void initTestClass() {
     }
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         containerNodeBodyMock = mock(ContainerNode.class);
         doReturn(CONTAINER_NODE_BODY_MOCK_TO_STRING).when(containerNodeBodyMock).toString();
         topicDOMNotification = new TopicDOMNotification(containerNodeBodyMock);
index a06b793e48c8ad5df96bc78b9e6a9142a2eac1a4..1a2d66c7c8f4a9e5af9886a938d438f011f99b21 100644 (file)
@@ -45,7 +45,7 @@ public class UtilTest {
     }
 
     @Test
-    public void testExpandQname() throws Exception {
+    public void testExpandQname() {
         // match no path because the list of the allowed paths is empty
         {
             final List<SchemaPath> paths = new ArrayList<>();
index d686c11b8de982a80b99ad69dfebb0313f626d0d..11857b9936fba6122bdaa82ccc8e7fbb069a1611 100644 (file)
@@ -29,7 +29,7 @@ public class ClientActor extends UntypedActor {
         return Props.create(ClientActor.class, target);
     }
 
-    @Override public void onReceive(Object message) throws Exception {
+    @Override public void onReceive(Object message) {
         if (message instanceof KeyValue) {
             target.tell(message, getSelf());
         } else if (message instanceof KeyValueSaved) {
index f457074a7b05d712892ba2f1b882a7a0fc9921db..d3bf544ef94d60365b1ae6cfb4046b5168110755 100644 (file)
@@ -57,7 +57,7 @@ public class ExampleRoleChangeListener extends AbstractUntypedActor implements A
     }
 
     @Override
-    protected void handleReceive(Object message) throws Exception {
+    protected void handleReceive(Object message) {
         if (message instanceof RegisterListener) {
             // called by the scheduler at intervals to register any unregistered notifiers
             sendRegistrationRequests();
@@ -141,7 +141,7 @@ public class ExampleRoleChangeListener extends AbstractUntypedActor implements A
 
 
     @Override
-    public void close() throws Exception {
+    public void close() {
         registrationSchedule.cancel();
     }
 }
index 42b226f2af71ac50464b53368f09d40c2770c6b8..f19c0356230b027c910c6bed502f2c3e023f55c8 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.controller.cluster.raft;
 
 import akka.actor.ActorRef;
 import com.google.common.io.ByteSource;
-import java.io.IOException;
 import java.io.OutputStream;
 import java.util.Optional;
 import org.opendaylight.controller.cluster.raft.persisted.EmptyState;
@@ -35,7 +34,7 @@ public final class NoopRaftActorSnapshotCohort implements RaftActorSnapshotCohor
     }
 
     @Override
-    public State deserializeSnapshot(ByteSource snapshotBytes) throws IOException {
+    public State deserializeSnapshot(ByteSource snapshotBytes) {
         return EmptyState.INSTANCE;
     }
 }
index 4f1fe376675d3acfbb75f93950ae421661b54cec..091237a5ca48bdc94a8d9141edc999f3700dc1a3 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.controller.cluster.raft.base.messages;
 
 import com.google.common.base.Preconditions;
 import java.io.Externalizable;
-import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
@@ -29,11 +28,11 @@ public abstract class EmptyExternalizableProxy implements Externalizable {
     }
 
     @Override
-    public void writeExternal(ObjectOutput out) throws IOException {
+    public void writeExternal(ObjectOutput out) {
     }
 
     @Override
-    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    public void readExternal(ObjectInput in) {
     }
 
     protected Object readResolve() {
index af208ec85b70040327aaa96e7d0798a1e19375c6..9b7a2f34566342ecd86a52aec1e96ef783f4b9ef 100644 (file)
@@ -59,7 +59,7 @@ public final class RequestVoteReply extends AbstractRaftRPC {
         }
 
         @Override
-        public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+        public void readExternal(ObjectInput in) throws IOException {
             long term = in.readLong();
             boolean voteGranted = in.readBoolean();
 
index ef3c8660d618e934134ecc74c793621ad676a9b4..3c0a8ac700c7de8e4e1fd156eb07ffbf0761d614 100644 (file)
@@ -45,7 +45,7 @@ public class ApplyJournalEntries implements Serializable, ControlMessage {
         }
 
         @Override
-        public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
+        public void readExternal(final ObjectInput in) throws IOException {
             applyEntries = new ApplyJournalEntries(in.readLong());
         }
 
index 70ad119b5a77872903c6b7526476ba24974af9c3..57f5af3a034e90d31f716eea1da38626832f593f 100644 (file)
@@ -41,7 +41,7 @@ public class DeleteEntries implements Serializable {
         }
 
         @Override
-        public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
+        public void readExternal(final ObjectInput in) throws IOException {
             deleteEntries = new DeleteEntries(in.readLong());
         }
 
index ac970c64e479558236fd6e03392d5cd86b074ec6..6e4d536d3d10bf4b32ad5452e55626788208bcc9 100644 (file)
@@ -290,8 +290,7 @@ public abstract class AbstractRaftActorIntegrationTest extends AbstractActorTest
     }
 
     protected void verifySnapshot(final String prefix, final Snapshot snapshot, final long lastAppliedTerm,
-            final long lastAppliedIndex, final long lastTerm, final long lastIndex)
-                    throws Exception {
+            final long lastAppliedIndex, final long lastTerm, final long lastIndex) {
         assertEquals(prefix + " Snapshot getLastAppliedTerm", lastAppliedTerm, snapshot.getLastAppliedTerm());
         assertEquals(prefix + " Snapshot getLastAppliedIndex", lastAppliedIndex, snapshot.getLastAppliedIndex());
         assertEquals(prefix + " Snapshot getLastTerm", lastTerm, snapshot.getLastTerm());
index 179f4f039ef650f6384dd392ed040cbafd2cae4d..471ea375899487b3aea1b46f916c7e001c316d04 100644 (file)
@@ -48,7 +48,7 @@ public class IsolationScenarioTest extends AbstractRaftActorIntegrationTest {
      * appropriately.
      */
     @Test
-    public void testLeaderIsolationWithAllPriorEntriesCommitted() throws Exception {
+    public void testLeaderIsolationWithAllPriorEntriesCommitted() {
         testLog.info("testLeaderIsolationWithAllPriorEntriesCommitted starting");
 
         createRaftActors();
@@ -133,7 +133,7 @@ public class IsolationScenarioTest extends AbstractRaftActorIntegrationTest {
      * sides should reconcile their logs appropriately.
      */
     @Test
-    public void testLeaderIsolationWithPriorUncommittedEntryAndOneConflictingEntry() throws Exception {
+    public void testLeaderIsolationWithPriorUncommittedEntryAndOneConflictingEntry() {
         testLog.info("testLeaderIsolationWithPriorUncommittedEntryAndOneConflictingEntry starting");
 
         createRaftActors();
@@ -254,7 +254,7 @@ public class IsolationScenarioTest extends AbstractRaftActorIntegrationTest {
      * and both sides should reconcile their logs appropriately.
      */
     @Test
-    public void testLeaderIsolationWithPriorUncommittedEntryAndMultipleConflictingEntries() throws Exception {
+    public void testLeaderIsolationWithPriorUncommittedEntryAndMultipleConflictingEntries() {
         testLog.info("testLeaderIsolationWithPriorUncommittedEntryAndMultipleConflictingEntries starting");
 
         createRaftActors();
index 2ed690748e31a247976312768e4f81acfe9c8719..e99215ddbaa8cee74d457b2ef1f55e098653a8f4 100644 (file)
@@ -319,7 +319,7 @@ public class LeadershipTransferIntegrationTest extends AbstractRaftActorIntegrat
     }
 
     @Test
-    public void testRequestLeadershipTransferToFollower2WithOtherFollowersDown() throws Exception {
+    public void testRequestLeadershipTransferToFollower2WithOtherFollowersDown() {
         testLog.info("testRequestLeadershipTransferToFollower2WithOtherFollowersDown starting");
 
         createRaftActors();
index 0b58c8927dcdc8373d21b65875ca15dd83003b41..5a1ac54c7cab6f8a477bce09d670e80463269c84 100644 (file)
@@ -52,7 +52,7 @@ public class MigratedMessagesTest extends AbstractActorTest {
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         factory.close();
         InMemoryJournal.clear();
         InMemorySnapshotStore.clear();
index bb201863c9206d71156bb41f12c0a657ac8d6579..1966e57f80f88e112e15bffbfc0ef22d5325d97a 100644 (file)
@@ -38,7 +38,7 @@ public class PreLeaderScenarioTest extends AbstractRaftActorIntegrationTest {
     private DefaultConfigParamsImpl followerConfigParams;
 
     @Test
-    public void testUnComittedEntryOnLeaderChange() throws Exception {
+    public void testUnComittedEntryOnLeaderChange() {
         testLog.info("testUnComittedEntryOnLeaderChange starting");
 
         createRaftActors();
index 29aadbb95c8fd0a3157fb2db98e982284b13c258..b1231d62d345b3477df95b4837da3c8ce2bcb46f 100644 (file)
@@ -135,12 +135,12 @@ public class RaftActorServerConfigurationSupportTest extends AbstractActorTest {
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         actorFactory.close();
     }
 
     @Test
-    public void testAddServerWithExistingFollower() throws Exception {
+    public void testAddServerWithExistingFollower() {
         LOG.info("testAddServerWithExistingFollower starting");
         setupNewFollower();
         RaftActorContextImpl followerActorContext = newFollowerContext(FOLLOWER_ID, followerActor);
@@ -225,7 +225,7 @@ public class RaftActorServerConfigurationSupportTest extends AbstractActorTest {
     }
 
     @Test
-    public void testAddServerWithNoExistingFollower() throws Exception {
+    public void testAddServerWithNoExistingFollower() {
         LOG.info("testAddServerWithNoExistingFollower starting");
 
         setupNewFollower();
@@ -281,7 +281,7 @@ public class RaftActorServerConfigurationSupportTest extends AbstractActorTest {
     }
 
     @Test
-    public void testAddServersAsNonVoting() throws Exception {
+    public void testAddServersAsNonVoting() {
         LOG.info("testAddServersAsNonVoting starting");
 
         setupNewFollower();
@@ -351,7 +351,7 @@ public class RaftActorServerConfigurationSupportTest extends AbstractActorTest {
     }
 
     @Test
-    public void testAddServerWithOperationInProgress() throws Exception {
+    public void testAddServerWithOperationInProgress() {
         LOG.info("testAddServerWithOperationInProgress starting");
 
         setupNewFollower();
@@ -414,7 +414,7 @@ public class RaftActorServerConfigurationSupportTest extends AbstractActorTest {
     }
 
     @Test
-    public void testAddServerWithPriorSnapshotInProgress() throws Exception {
+    public void testAddServerWithPriorSnapshotInProgress() {
         LOG.info("testAddServerWithPriorSnapshotInProgress starting");
 
         setupNewFollower();
@@ -461,7 +461,7 @@ public class RaftActorServerConfigurationSupportTest extends AbstractActorTest {
     }
 
     @Test
-    public void testAddServerWithPriorSnapshotCompleteTimeout() throws Exception {
+    public void testAddServerWithPriorSnapshotCompleteTimeout() {
         LOG.info("testAddServerWithPriorSnapshotCompleteTimeout starting");
 
         setupNewFollower();
@@ -493,7 +493,7 @@ public class RaftActorServerConfigurationSupportTest extends AbstractActorTest {
     }
 
     @Test
-    public void testAddServerWithLeaderChangeBeforePriorSnapshotComplete() throws Exception {
+    public void testAddServerWithLeaderChangeBeforePriorSnapshotComplete() {
         LOG.info("testAddServerWithLeaderChangeBeforePriorSnapshotComplete starting");
 
         setupNewFollower();
@@ -542,7 +542,7 @@ public class RaftActorServerConfigurationSupportTest extends AbstractActorTest {
     }
 
     @Test
-    public void testAddServerWithLeaderChangeDuringInstallSnapshot() throws Exception {
+    public void testAddServerWithLeaderChangeDuringInstallSnapshot() {
         LOG.info("testAddServerWithLeaderChangeDuringInstallSnapshot starting");
 
         setupNewFollower();
@@ -587,7 +587,7 @@ public class RaftActorServerConfigurationSupportTest extends AbstractActorTest {
     }
 
     @Test
-    public void testAddServerWithInstallSnapshotTimeout() throws Exception {
+    public void testAddServerWithInstallSnapshotTimeout() {
         LOG.info("testAddServerWithInstallSnapshotTimeout starting");
 
         setupNewFollower();
@@ -846,7 +846,7 @@ public class RaftActorServerConfigurationSupportTest extends AbstractActorTest {
     }
 
     @Test
-    public void testRemoveServer() throws Exception {
+    public void testRemoveServer() {
         LOG.info("testRemoveServer starting");
 
         DefaultConfigParamsImpl configParams = new DefaultConfigParamsImpl();
index 56089eca4d976a774ed46a7290434283fd61511d..8a6b0ad61b81ee72a20db6f5069b36181cbd441e 100644 (file)
@@ -106,7 +106,7 @@ public class RaftActorTest extends AbstractActorTest {
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         factory.close();
         InMemoryJournal.clear();
         InMemorySnapshotStore.clear();
@@ -125,7 +125,7 @@ public class RaftActorTest extends AbstractActorTest {
 
 
     @Test
-    public void testRaftActorRecoveryWithPersistenceEnabled() throws Exception {
+    public void testRaftActorRecoveryWithPersistenceEnabled() {
         TEST_LOG.info("testRaftActorRecoveryWithPersistenceEnabled starting");
 
         TestKit kit = new TestKit(getSystem());
@@ -212,7 +212,7 @@ public class RaftActorTest extends AbstractActorTest {
     }
 
     @Test
-    public void testRaftActorRecoveryWithPersistenceDisabled() throws Exception {
+    public void testRaftActorRecoveryWithPersistenceDisabled() {
         String persistenceId = factory.generateActorId("follower-");
 
         DefaultConfigParamsImpl config = new DefaultConfigParamsImpl();
@@ -233,7 +233,7 @@ public class RaftActorTest extends AbstractActorTest {
     }
 
     @Test
-    public void testUpdateElectionTermPersistedWithPersistenceDisabled() throws Exception {
+    public void testUpdateElectionTermPersistedWithPersistenceDisabled() {
         final TestKit kit = new TestKit(getSystem());
         String persistenceId = factory.generateActorId("follower-");
         DefaultConfigParamsImpl config = new DefaultConfigParamsImpl();
@@ -393,7 +393,7 @@ public class RaftActorTest extends AbstractActorTest {
     }
 
     @Test
-    public void testApplyState() throws Exception {
+    public void testApplyState() {
         String persistenceId = factory.generateActorId("leader-");
 
         DefaultConfigParamsImpl config = new DefaultConfigParamsImpl();
@@ -958,7 +958,7 @@ public class RaftActorTest extends AbstractActorTest {
     }
 
     @Test
-    public void testUpdateConfigParam() throws Exception {
+    public void testUpdateConfigParam() {
         DefaultConfigParamsImpl emptyConfig = new DefaultConfigParamsImpl();
         String persistenceId = factory.generateActorId("follower-");
         ImmutableMap<String, String> peerAddresses =
@@ -1006,7 +1006,7 @@ public class RaftActorTest extends AbstractActorTest {
     }
 
     @Test
-    public void testGetSnapshot() throws Exception {
+    public void testGetSnapshot() {
         TEST_LOG.info("testGetSnapshot starting");
 
         final TestKit kit = new TestKit(getSystem());
@@ -1095,7 +1095,7 @@ public class RaftActorTest extends AbstractActorTest {
     }
 
     @Test
-    public void testRestoreFromSnapshot() throws Exception {
+    public void testRestoreFromSnapshot() {
         TEST_LOG.info("testRestoreFromSnapshot starting");
 
         String persistenceId = factory.generateActorId("test-actor-");
@@ -1208,7 +1208,7 @@ public class RaftActorTest extends AbstractActorTest {
     }
 
     @Test
-    public void testNonVotingOnRecovery() throws Exception {
+    public void testNonVotingOnRecovery() {
         TEST_LOG.info("testNonVotingOnRecovery starting");
 
         DefaultConfigParamsImpl config = new DefaultConfigParamsImpl();
@@ -1234,7 +1234,7 @@ public class RaftActorTest extends AbstractActorTest {
     }
 
     @Test
-    public void testLeaderTransitioning() throws Exception {
+    public void testLeaderTransitioning() {
         TEST_LOG.info("testLeaderTransitioning starting");
 
         ActorRef notifierActor = factory.createActor(MessageCollectorActor.props());
index 35c051234b5ee6f785c95f0db40a0aac2e52c8a7..7004ca88787707c7b094d4c1e520db9fed5076bb 100644 (file)
@@ -39,7 +39,7 @@ public class RecoveryIntegrationSingleNodeTest extends AbstractRaftActorIntegrat
 
 
     @Test
-    public void testJournalReplayAfterSnapshotWithSingleNode() throws Exception {
+    public void testJournalReplayAfterSnapshotWithSingleNode() {
 
         String persistenceId = factory.generateActorId("singleNode");
         TestActorRef<AbstractRaftActorIntegrationTest.TestRaftActor> singleNodeActorRef =
index 2a881b69ee64c24fa03556a37f8783c052b9be2d..de6a4909c3c46ec5aac42a8455c69c2f2b446644 100644 (file)
@@ -140,7 +140,7 @@ public class RecoveryIntegrationTest extends AbstractRaftActorIntegrationTest {
     }
 
     @Test
-    public void testFollowerRecoveryAfterInstallSnapshot() throws Exception {
+    public void testFollowerRecoveryAfterInstallSnapshot() {
 
         send2InitialPayloads();
 
index e53dfe671494e6f01f675c29eb31d12cac1a1355..050b0ddf35d0391a64e47577b391e3d95918a471 100644 (file)
@@ -45,7 +45,7 @@ public class ReplicationAndSnapshotsIntegrationTest extends AbstractRaftActorInt
     private MockPayload payload7;
 
     @Test
-    public void runTest() throws Exception {
+    public void runTest() {
         testLog.info("testReplicationAndSnapshots starting");
 
         // Setup the persistent journal for the leader. We'll start up with 3 journal log entries (one less
@@ -163,7 +163,7 @@ public class ReplicationAndSnapshotsIntegrationTest extends AbstractRaftActorInt
      * scenario, the follower consensus and application of state is delayed until after the snapshot
      * completes.
      */
-    private void testFirstSnapshot() throws Exception {
+    private void testFirstSnapshot() {
         testLog.info("testFirstSnapshot starting");
 
         expSnapshotState.add(recoveredPayload0);
@@ -306,7 +306,7 @@ public class ReplicationAndSnapshotsIntegrationTest extends AbstractRaftActorInt
      * Send one more payload to trigger another snapshot. In this scenario, we delay the snapshot until
      * consensus occurs and the leader applies the state.
      */
-    private void testSecondSnapshot() throws Exception {
+    private void testSecondSnapshot() {
         testLog.info("testSecondSnapshot starting");
 
         expSnapshotState.add(payload3);
index 0dbcb1fbd0943ec0e26328910f97060826ce13a1..7b240d7254f56083eabcbbb7d7c7f3a04ec74ffc 100644 (file)
@@ -100,7 +100,7 @@ public class ReplicationAndSnapshotsWithLaggingFollowerIntegrationTest extends A
      * caught up via AppendEntries.
      */
     @Test
-    public void testReplicationsWithLaggingFollowerCaughtUpViaAppendEntries() throws Exception {
+    public void testReplicationsWithLaggingFollowerCaughtUpViaAppendEntries() {
         testLog.info("testReplicationsWithLaggingFollowerCaughtUpViaAppendEntries starting: sending 2 new payloads");
 
         setup();
@@ -171,7 +171,7 @@ public class ReplicationAndSnapshotsWithLaggingFollowerIntegrationTest extends A
      * sent by the leader.
      */
     @Test
-    public void testLeaderSnapshotWithLaggingFollowerCaughtUpViaAppendEntries() throws Exception {
+    public void testLeaderSnapshotWithLaggingFollowerCaughtUpViaAppendEntries() {
         testLog.info("testLeaderSnapshotWithLaggingFollowerCaughtUpViaAppendEntries starting");
 
         setup();
@@ -290,7 +290,7 @@ public class ReplicationAndSnapshotsWithLaggingFollowerIntegrationTest extends A
      * installed by the leader.
      */
     @Test
-    public void testLeaderSnapshotWithLaggingFollowerCaughtUpViaInstallSnapshot() throws Exception {
+    public void testLeaderSnapshotWithLaggingFollowerCaughtUpViaInstallSnapshot() {
         testLog.info("testLeaderSnapshotWithLaggingFollowerCaughtUpViaInstallSnapshot starting");
 
         setup();
@@ -390,7 +390,7 @@ public class ReplicationAndSnapshotsWithLaggingFollowerIntegrationTest extends A
      * by the leader.
      */
     @Test
-    public void testLeaderSnapshotTriggeredByMemoryThresholdExceededWithLaggingFollower() throws Exception {
+    public void testLeaderSnapshotTriggeredByMemoryThresholdExceededWithLaggingFollower() {
         testLog.info("testLeaderSnapshotTriggeredByMemoryThresholdExceededWithLaggingFollower starting");
 
         snapshotBatchCount = 5;
@@ -486,7 +486,7 @@ public class ReplicationAndSnapshotsWithLaggingFollowerIntegrationTest extends A
      * Send another payload to verify another snapshot is not done since the last snapshot trimmed the
      * first log entry so the memory threshold should not be exceeded.
      */
-    private void verifyNoSubsequentSnapshotAfterMemoryThresholdExceededSnapshot() throws Exception {
+    private void verifyNoSubsequentSnapshotAfterMemoryThresholdExceededSnapshot() {
         ApplyState applyState;
         CaptureSnapshot captureSnapshot;
 
@@ -530,7 +530,7 @@ public class ReplicationAndSnapshotsWithLaggingFollowerIntegrationTest extends A
      * Resume the lagging follower 2 and verify it receives an install snapshot from the leader.
      */
     private void verifyInstallSnapshotToLaggingFollower(long lastAppliedIndex,
-            @Nullable ServerConfigurationPayload expServerConfig) throws Exception {
+            @Nullable ServerConfigurationPayload expServerConfig) {
         testLog.info("verifyInstallSnapshotToLaggingFollower starting");
 
         MessageCollectorActor.clearMessages(leaderCollectorActor);
@@ -624,7 +624,7 @@ public class ReplicationAndSnapshotsWithLaggingFollowerIntegrationTest extends A
      * Do another round of payloads and snapshot to verify replicatedToAllIndex gets back on track and
      * snapshots works as expected after doing a follower snapshot. In this step we don't lag a follower.
      */
-    private long verifyReplicationsAndSnapshotWithNoLaggingAfterInstallSnapshot() throws Exception {
+    private long verifyReplicationsAndSnapshotWithNoLaggingAfterInstallSnapshot() {
         testLog.info(
                 "verifyReplicationsAndSnapshotWithNoLaggingAfterInstallSnapshot starting: replicatedToAllIndex: {}",
                 leader.getReplicatedToAllIndex());
index ea6de4106ada5c59000f91325e3e65ad612efae9..fda95eaa1d2f4a254240fe24aea6456fb32de767 100644 (file)
@@ -24,7 +24,7 @@ import org.opendaylight.controller.cluster.raft.base.messages.ApplyState;
 public class ReplicationWithSlicedPayloadIntegrationTest extends AbstractRaftActorIntegrationTest {
 
     @Test
-    public void runTest() throws Exception {
+    public void runTest() {
         testLog.info("ReplicationWithSlicedPayloadIntegrationTest starting");
 
         // Create the leader and 2 follower actors.
index ccbdb5531faaf9f6bd6bd3a4662ee122d3f0db33..44f8f8041f86f2d7c9ec1bbde52cede5bfa9d7da 100644 (file)
@@ -120,7 +120,7 @@ public class SnapshotManagerTest extends AbstractActorTest {
 
     @SuppressWarnings({ "unchecked", "rawtypes" })
     @Test
-    public void testCaptureToInstall() throws Exception {
+    public void testCaptureToInstall() {
 
         // Force capturing toInstall = true
         snapshotManager.captureToInstall(new SimpleReplicatedLogEntry(0, 1,
@@ -150,7 +150,7 @@ public class SnapshotManagerTest extends AbstractActorTest {
 
     @SuppressWarnings({ "rawtypes", "unchecked" })
     @Test
-    public void testCapture() throws Exception {
+    public void testCapture() {
         boolean capture = snapshotManager.capture(new SimpleReplicatedLogEntry(9, 1,
                 new MockRaftActorContext.MockPayload()), 9);
 
@@ -181,7 +181,7 @@ public class SnapshotManagerTest extends AbstractActorTest {
 
     @SuppressWarnings({ "unchecked", "rawtypes" })
     @Test
-    public void testCaptureWithNullLastLogEntry() throws Exception {
+    public void testCaptureWithNullLastLogEntry() {
         boolean capture = snapshotManager.capture(null, 1);
 
         assertTrue(capture);
@@ -209,7 +209,7 @@ public class SnapshotManagerTest extends AbstractActorTest {
     }
 
     @Test
-    public void testCaptureWithCreateProcedureError() throws Exception {
+    public void testCaptureWithCreateProcedureError() {
         doThrow(new RuntimeException("mock")).when(mockProcedure).accept(anyObject());
 
         boolean capture = snapshotManager.capture(new SimpleReplicatedLogEntry(9, 1,
@@ -224,7 +224,7 @@ public class SnapshotManagerTest extends AbstractActorTest {
 
     @SuppressWarnings("unchecked")
     @Test
-    public void testIllegalCapture() throws Exception {
+    public void testIllegalCapture() {
         boolean capture = snapshotManager.capture(new SimpleReplicatedLogEntry(9, 1,
                 new MockRaftActorContext.MockPayload()), 9);
 
@@ -244,7 +244,7 @@ public class SnapshotManagerTest extends AbstractActorTest {
     }
 
     @Test
-    public void testPersistWhenReplicatedToAllIndexMinusOne() throws Exception {
+    public void testPersistWhenReplicatedToAllIndexMinusOne() {
         doReturn(7L).when(mockReplicatedLog).getSnapshotIndex();
         doReturn(1L).when(mockReplicatedLog).getSnapshotTerm();
 
@@ -284,7 +284,7 @@ public class SnapshotManagerTest extends AbstractActorTest {
     }
 
     @Test
-    public void testPersistWhenReplicatedToAllIndexNotMinus() throws Exception {
+    public void testPersistWhenReplicatedToAllIndexNotMinus() {
         doReturn(45L).when(mockReplicatedLog).getSnapshotIndex();
         doReturn(6L).when(mockReplicatedLog).getSnapshotTerm();
         ReplicatedLogEntry replicatedLogEntry = mock(ReplicatedLogEntry.class);
index f3d1aac03050200a2cb70057126676d49ad6a092..9daacb040f87a9ee25ba9a06c8c3c25acc4687fe 100644 (file)
@@ -226,7 +226,7 @@ public class AbstractLeaderElectionScenarioTest {
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 
index 5ef329060c45de8c482f048cedbfb3ea0085ea0b..69c48b978f73aa451a7aec5ee07696a7cfc8a172 100644 (file)
@@ -33,7 +33,7 @@ public abstract class AbstractLeaderTest<T extends AbstractLeader> extends Abstr
      * that regardless of whether followers respond or not we schedule heartbeats.
      */
     @Test
-    public void testLeaderSchedulesHeartbeatsEvenWhenNoFollowersRespondToInitialAppendEntries() throws Exception {
+    public void testLeaderSchedulesHeartbeatsEvenWhenNoFollowersRespondToInitialAppendEntries() {
         logStart("testLeaderSchedulesHeartbeatsEvenWhenNoFollowersRespondToInitialAppendEntries");
 
         String leaderActorId = actorFactory.generateActorId("leader");
index 8f0b6136643864011138c1626cad3b987dbb8857..a9305a6862f32f3737a194ad6ef601f6e77baff0 100644 (file)
@@ -9,8 +9,6 @@ package org.opendaylight.controller.cluster.raft.behaviors;
 
 import static org.junit.Assert.assertEquals;
 
-import java.io.FileNotFoundException;
-import java.io.IOException;
 import org.apache.commons.lang.SerializationUtils;
 import org.junit.Test;
 
@@ -22,7 +20,7 @@ import org.junit.Test;
 public class FollowerIdentifierTest {
 
     @Test
-    public void testSerialization() throws FileNotFoundException, IOException {
+    public void testSerialization() {
         FollowerIdentifier expected = new FollowerIdentifier("follower1");
         FollowerIdentifier cloned = (FollowerIdentifier) SerializationUtils.clone(expected);
         assertEquals("cloned", expected, cloned);
index 283826af3ba55563020adc852e0cf3e15748b137..794a18d2d253d5f84dfc3258c026900ae2d03204 100644 (file)
@@ -61,7 +61,7 @@ public class IsolatedLeaderTest extends AbstractLeaderTest<IsolatedLeader> {
     }
 
     @Test
-    public void testHandleMessageWithThreeMembers() throws Exception {
+    public void testHandleMessageWithThreeMembers() {
         String followerAddress1 = "akka://test/user/$a";
         String followerAddress2 = "akka://test/user/$b";
 
@@ -93,7 +93,7 @@ public class IsolatedLeaderTest extends AbstractLeaderTest<IsolatedLeader> {
     }
 
     @Test
-    public void testHandleMessageWithFiveMembers() throws Exception {
+    public void testHandleMessageWithFiveMembers() {
         String followerAddress1 = "akka://test/user/$a";
         String followerAddress2 = "akka://test/user/$b";
         String followerAddress3 = "akka://test/user/$c";
@@ -135,7 +135,7 @@ public class IsolatedLeaderTest extends AbstractLeaderTest<IsolatedLeader> {
     }
 
     @Test
-    public void testHandleMessageFromAnotherLeader() throws Exception {
+    public void testHandleMessageFromAnotherLeader() {
         String followerAddress1 = "akka://test/user/$a";
         String followerAddress2 = "akka://test/user/$b";
 
index 04ae7ffe8ce77f4e6634f1a672013d79b9d01764..982ac7bc38fe5238ab676a7fb211bdcf0e5dfb7f 100644 (file)
@@ -104,7 +104,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testHandleMessageForUnknownMessage() throws Exception {
+    public void testHandleMessageForUnknownMessage() {
         logStart("testHandleMessageForUnknownMessage");
 
         leader = new Leader(createActorContext());
@@ -114,7 +114,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testThatLeaderSendsAHeartbeatMessageToAllFollowers() throws Exception {
+    public void testThatLeaderSendsAHeartbeatMessageToAllFollowers() {
         logStart("testThatLeaderSendsAHeartbeatMessageToAllFollowers");
 
         MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -174,7 +174,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testHandleReplicateMessageSendAppendEntriesToFollower() throws Exception {
+    public void testHandleReplicateMessageSendAppendEntriesToFollower() {
         logStart("testHandleReplicateMessageSendAppendEntriesToFollower");
 
         MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -211,7 +211,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testHandleReplicateMessageWithHigherTermThanPreviousEntry() throws Exception {
+    public void testHandleReplicateMessageWithHigherTermThanPreviousEntry() {
         logStart("testHandleReplicateMessageWithHigherTermThanPreviousEntry");
 
         MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -266,7 +266,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testHandleReplicateMessageCommitIndexIncrementedBeforeConsensus() throws Exception {
+    public void testHandleReplicateMessageCommitIndexIncrementedBeforeConsensus() {
         logStart("testHandleReplicateMessageCommitIndexIncrementedBeforeConsensus");
 
         MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -304,7 +304,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testMultipleReplicateShouldNotCauseDuplicateAppendEntriesToBeSent() throws Exception {
+    public void testMultipleReplicateShouldNotCauseDuplicateAppendEntriesToBeSent() {
         logStart("testHandleReplicateMessageSendAppendEntriesToFollower");
 
         MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -344,7 +344,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testMultipleReplicateWithReplyShouldResultInAppendEntries() throws Exception {
+    public void testMultipleReplicateWithReplyShouldResultInAppendEntries() {
         logStart("testMultipleReplicateWithReplyShouldResultInAppendEntries");
 
         MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -394,7 +394,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testDuplicateAppendEntriesWillBeSentOnHeartBeat() throws Exception {
+    public void testDuplicateAppendEntriesWillBeSentOnHeartBeat() {
         logStart("testDuplicateAppendEntriesWillBeSentOnHeartBeat");
 
         MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -439,7 +439,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testHeartbeatsAreAlwaysSentIfTheHeartbeatIntervalHasElapsed() throws Exception {
+    public void testHeartbeatsAreAlwaysSentIfTheHeartbeatIntervalHasElapsed() {
         logStart("testHeartbeatsAreAlwaysSentIfTheHeartbeatIntervalHasElapsed");
 
         MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -476,7 +476,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testSendingReplicateImmediatelyAfterHeartbeatDoesReplicate() throws Exception {
+    public void testSendingReplicateImmediatelyAfterHeartbeatDoesReplicate() {
         logStart("testSendingReplicateImmediatelyAfterHeartbeatDoesReplicate");
 
         MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -516,7 +516,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
 
 
     @Test
-    public void testHandleReplicateMessageWhenThereAreNoFollowers() throws Exception {
+    public void testHandleReplicateMessageWhenThereAreNoFollowers() {
         logStart("testHandleReplicateMessageWhenThereAreNoFollowers");
 
         MockRaftActorContext actorContext = createActorContext();
@@ -624,7 +624,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testSendAppendEntriesSnapshotScenario() throws Exception {
+    public void testSendAppendEntriesSnapshotScenario() {
         logStart("testSendAppendEntriesSnapshotScenario");
 
         final MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -673,7 +673,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testInitiateInstallSnapshot() throws Exception {
+    public void testInitiateInstallSnapshot() {
         logStart("testInitiateInstallSnapshot");
 
         MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -813,7 +813,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
 
 
     @Test
-    public void testInstallSnapshot() throws Exception {
+    public void testInstallSnapshot() {
         logStart("testInstallSnapshot");
 
         final MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -868,7 +868,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testForceInstallSnapshot() throws Exception {
+    public void testForceInstallSnapshot() {
         logStart("testForceInstallSnapshot");
 
         final MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -983,7 +983,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testSendSnapshotfromInstallSnapshotReply() throws Exception {
+    public void testSendSnapshotfromInstallSnapshotReply() {
         logStart("testSendSnapshotfromInstallSnapshotReply");
 
         MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -1061,7 +1061,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
 
 
     @Test
-    public void testHandleInstallSnapshotReplyWithInvalidChunkIndex() throws Exception {
+    public void testHandleInstallSnapshotReplyWithInvalidChunkIndex() {
         logStart("testHandleInstallSnapshotReplyWithInvalidChunkIndex");
 
         MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -1126,7 +1126,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testHandleSnapshotSendsPreviousChunksHashCodeWhenSendingNextChunk() throws Exception {
+    public void testHandleSnapshotSendsPreviousChunksHashCodeWhenSendingNextChunk() {
         logStart("testHandleSnapshotSendsPreviousChunksHashCodeWhenSendingNextChunk");
 
         MockRaftActorContext actorContext = createActorContextWithFollower();
@@ -1271,7 +1271,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testLeaderCreatedWithCommitIndexLessThanLastIndex() throws Exception {
+    public void testLeaderCreatedWithCommitIndexLessThanLastIndex() {
         logStart("testLeaderCreatedWithCommitIndexLessThanLastIndex");
 
         final MockRaftActorContext leaderActorContext = createActorContextWithFollower();
@@ -1326,7 +1326,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testLeaderCreatedWithCommitIndexLessThanFollowersCommitIndex() throws Exception {
+    public void testLeaderCreatedWithCommitIndexLessThanFollowersCommitIndex() {
         logStart("testLeaderCreatedWithCommitIndexLessThanFollowersCommitIndex");
 
         final MockRaftActorContext leaderActorContext = createActorContext();
@@ -1696,7 +1696,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testHandleAppendEntriesReplySuccess() throws Exception {
+    public void testHandleAppendEntriesReplySuccess() {
         logStart("testHandleAppendEntriesReplySuccess");
 
         MockRaftActorContext leaderActorContext = createActorContextWithFollower();
@@ -1940,7 +1940,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testIsolatedLeaderCheckTwoFollowers() throws Exception {
+    public void testIsolatedLeaderCheckTwoFollowers() {
         logStart("testIsolatedLeaderCheckTwoFollowers");
 
         RaftActorBehavior newBehavior = setupIsolatedLeaderCheckTestWithTwoFollowers(DefaultRaftPolicy.INSTANCE);
@@ -1950,7 +1950,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testIsolatedLeaderCheckTwoFollowersWhenElectionsAreDisabled() throws Exception {
+    public void testIsolatedLeaderCheckTwoFollowersWhenElectionsAreDisabled() {
         logStart("testIsolatedLeaderCheckTwoFollowersWhenElectionsAreDisabled");
 
         RaftActorBehavior newBehavior = setupIsolatedLeaderCheckTestWithTwoFollowers(createRaftPolicy(false, true));
@@ -1960,7 +1960,7 @@ public class LeaderTest extends AbstractLeaderTest<Leader> {
     }
 
     @Test
-    public void testLaggingFollowerStarvation() throws Exception {
+    public void testLaggingFollowerStarvation() {
         logStart("testLaggingFollowerStarvation");
 
         String leaderActorId = actorFactory.generateActorId("leader");
index 38740355be517d1e7a933740df9c92d8a7eba2c0..e5f7c6eaa6487b425c3113838d94b2f01db3569b 100644 (file)
@@ -33,7 +33,7 @@ public class PartitionedLeadersElectionScenarioTest extends AbstractLeaderElecti
      * sends a heartbeat first when connectivity is re-established.
      */
     @Test
-    public void runTest1() throws Exception {
+    public void runTest1() {
         testLog.info("PartitionedLeadersElectionScenarioTest 1 starting");
 
         setupInitialMemberBehaviors();
@@ -54,7 +54,7 @@ public class PartitionedLeadersElectionScenarioTest extends AbstractLeaderElecti
      * sends a heartbeat first when connectivity is re-established.
      */
     @Test
-    public void runTest2() throws Exception {
+    public void runTest2() {
         testLog.info("PartitionedLeadersElectionScenarioTest 2 starting");
 
         setupInitialMemberBehaviors();
@@ -238,7 +238,7 @@ public class PartitionedLeadersElectionScenarioTest extends AbstractLeaderElecti
         testLog.info("sendInitialElectionTimeoutToFollowerMember3 ending");
     }
 
-    private void sendInitialElectionTimeoutToFollowerMember2() throws Exception {
+    private void sendInitialElectionTimeoutToFollowerMember2() {
         testLog.info("sendInitialElectionTimeoutToFollowerMember2 starting");
 
         // Send ElectionTimeout to member 2 to simulate no heartbeat from the Leader (member 1).
@@ -275,7 +275,7 @@ public class PartitionedLeadersElectionScenarioTest extends AbstractLeaderElecti
         testLog.info("sendInitialElectionTimeoutToFollowerMember2 ending");
     }
 
-    private void setupInitialMemberBehaviors() throws Exception {
+    private void setupInitialMemberBehaviors() {
         testLog.info("setupInitialMemberBehaviors starting");
 
         // Create member 2's behavior initially as Follower
index b4f4c5d61370df18ed33829000d2aa0584ef9d6d..fdbab2b81a44f48ca6c80b05520bf6bab788d2f2 100644 (file)
@@ -35,7 +35,7 @@ public class SyncStatusTrackerTest extends AbstractActorTest {
     }
 
     @Test
-    public void testUpdate() throws Exception {
+    public void testUpdate() {
         SyncStatusTracker tracker = new SyncStatusTracker(listener, "commit-tracker", 10);
 
         // When leader-1 sends the first update message the listener should receive a syncStatus notification
index 2ea40ebfd5f55323102ffe14b38b5f2eef277783..4a73aadc197779acc4b992ec98e9f865d64deeb8 100644 (file)
@@ -11,7 +11,7 @@ package org.opendaylight.controller.cluster.raft.utils;
 import akka.actor.UntypedActor;
 
 public class DoNothingActor extends UntypedActor {
-    @Override public void onReceive(Object message) throws Exception {
+    @Override public void onReceive(Object message) {
 
     }
 }
index a0e01c2cf114433d72b013a4a8105dcfad1d5452..1a730f90764e733f1fa0bcc7e3fc259bf2d8f51f 100644 (file)
@@ -16,7 +16,7 @@ import akka.actor.UntypedActor;
 public class EchoActor extends UntypedActor {
 
     @Override
-    public void onReceive(Object message) throws Exception {
+    public void onReceive(Object message) {
         getSender().tell(message, getSelf());
     }
 }
index 7c298466216f8e61e9396c4664e54cca7f0b504f..64e777df03c9999b4dd52f4857307b6e09da198a 100644 (file)
@@ -48,7 +48,7 @@ public abstract class AbstractBrokerAwareActivator implements BundleActivator {
 
 
     @Override
-    public final void start(BundleContext bundleContext) throws Exception {
+    public final void start(BundleContext bundleContext) {
         this.context = bundleContext;
         startImpl(bundleContext);
         tracker = new ServiceTracker<>(bundleContext, BindingAwareBroker.class, customizer);
@@ -59,7 +59,7 @@ public abstract class AbstractBrokerAwareActivator implements BundleActivator {
 
 
     @Override
-    public final  void stop(BundleContext bundleContext) throws Exception {
+    public final  void stop(BundleContext bundleContext) {
         if (tracker != null) {
             tracker.close();
         }
index 174f973adedaf27e8911d29057ac68a004af1269..896d26ffc9729176c2173b575a1ef6a6d020d279 100644 (file)
@@ -30,7 +30,7 @@ public class BindingDOMMountPointServiceAdapter implements MountPointService {
             .weakKeys().build(new CacheLoader<DOMMountPoint, BindingMountPointAdapter>() {
 
                 @Override
-                public BindingMountPointAdapter load(DOMMountPoint key) throws Exception {
+                public BindingMountPointAdapter load(DOMMountPoint key) {
                     return new BindingMountPointAdapter(codec,key);
                 }
             });
index e3abb1f13a2e2ecc05903de311ca4806622992a1..b58c56c9013a3fbc81eeefbc4d8768af842dd220 100644 (file)
@@ -30,7 +30,7 @@ public class BindingDOMRpcServiceAdapter implements RpcConsumerRegistry {
             .build(new CacheLoader<Class<? extends RpcService>, RpcServiceAdapter>() {
 
                 @Override
-                public RpcServiceAdapter load(final Class<? extends RpcService> key) throws Exception {
+                public RpcServiceAdapter load(final Class<? extends RpcService> key) {
                     return createProxy(key);
                 }
 
index a639bb9c7a0ae494063dc114cd26a3c1d2f06e9d..9fa43abecf752aa8772024b1e4eb2c0d83056bc1 100644 (file)
@@ -34,7 +34,7 @@ abstract class ContextReferenceExtractor {
             .weakKeys().build(new CacheLoader<Class<?>, ContextReferenceExtractor>() {
 
                 @Override
-                public ContextReferenceExtractor load(final Class<?> key) throws Exception {
+                public ContextReferenceExtractor load(final Class<?> key) {
                     return create(key);
                 }
             });
index f16f34ea51b38d70ad7cd5764372292bee8c47b1..173477cb6ecc9b28dca387e58925a05e9932310f 100644 (file)
@@ -74,7 +74,7 @@ final class LazyDOMRpcResultFuture implements CheckedFuture<DOMRpcResult, DOMRpc
     }
 
     @Override
-    public DOMRpcResult checkedGet() throws DOMRpcException {
+    public DOMRpcResult checkedGet() {
         try {
             return get();
         } catch (InterruptedException | ExecutionException e) {
@@ -84,7 +84,7 @@ final class LazyDOMRpcResultFuture implements CheckedFuture<DOMRpcResult, DOMRpc
     }
 
     @Override
-    public DOMRpcResult checkedGet(final long timeout, final TimeUnit unit) throws TimeoutException, DOMRpcException {
+    public DOMRpcResult checkedGet(final long timeout, final TimeUnit unit) throws TimeoutException {
         try {
             return get(timeout, unit);
         } catch (InterruptedException | ExecutionException e) {
index 63c20e5c3785fcdafc0b4312d1ac4d60051183e8..cb47746aceeb2a86d84ea28e8d2af426362a12f8 100644 (file)
@@ -94,7 +94,7 @@ class RpcServiceAdapter implements InvocationHandler {
     }
 
     @Override
-    public Object invoke(final Object proxyObj, final Method method, final Object[] args) throws Throwable {
+    public Object invoke(final Object proxyObj, final Method method, final Object[] args) {
 
         final RpcInvocationStrategy rpc = rpcNames.get(method);
         if (rpc != null) {
index 95204ceabf82e686491be4acbc21c776dbe2374f..fc53bbeed8e020019b46f78b68869afa9ba090dc 100644 (file)
@@ -162,7 +162,7 @@ public class RootBindingAwareBroker implements Mutable, Identifiable<String>, Bi
     }
 
     @Override
-    public void close() throws Exception {
+    public void close() {
         // FIXME: Close all sessions
     }
 
index 4a84c319f71722c9c5becc797d0b197bd3918305..5414a14dd4343f5873dd5f96e933af15cb07e7ef 100644 (file)
@@ -38,7 +38,7 @@ public class Bug4513Test extends AbstractDataBrokerTest {
 
     @SuppressWarnings({ "rawtypes", "unchecked" })
     @Test
-    public void testDataTreeChangeListener() throws Exception {
+    public void testDataTreeChangeListener() {
         DataBroker dataBroker = getDataBroker();
 
         DataTreeChangeListener<ListItem> listener = mock(DataTreeChangeListener.class);
index a41f6f03ea5dc4146cdf934b1053ed76e0ce2544..58176a073c65736fc3a29ef221c08e7fb59f81ab 100644 (file)
@@ -151,7 +151,7 @@ public class DataTreeChangeListenerTest extends AbstractConcurrentDataBrokerTest
 
     @SuppressWarnings("unchecked")
     @Test
-    public void testWildcardNotificationOfPreexistingData() throws Exception {
+    public void testWildcardNotificationOfPreexistingData() {
         InstanceIdentifier<Top> id = InstanceIdentifier.builder(Top.class).build();
         ArrayList<TopLevelList> list = new ArrayList<>();
         list.add(new TopLevelListBuilder().setName("name").build());
index 246188629c3d48c04133d94d9710bfb030e5f66c..81171349d739d75cf4f1e12e5317618896565fa9 100644 (file)
@@ -156,7 +156,7 @@ public class DOMRpcServiceTestBugfix560 {
      * @throws java.lang.Exception
      */
     @After
-    public void teardown() throws Exception {
+    public void teardown() {
         testContext.close();
     }
 }
index 37514ae4af82697fc517405d25acf7204f48dab9..9987bffda1ed3c6eedfb3cd0ac5ef4fd4e5db67d 100644 (file)
@@ -48,7 +48,7 @@ public class MessageCapturingFlowService implements OpendaylightOfMigrationTestM
     }
 
     @Override
-    public void close() throws Exception {
+    public void close() {
         registration.close();
     }
 
index 43ed93f7277915798fd5ed3b5fd28579e9b54ed6..3d7e27754d97c65b291ad8c3f399ee9f8d4c4580 100644 (file)
@@ -103,7 +103,7 @@ public final class BindingContextUtils {
         }
 
         @Override
-        public final void close() throws Exception {
+        public final void close() {
             alreadyRetrievedServices = null;
             serviceProvider = null;
         }
index 427d28585f650c4cb67d452481ff12958070bce2..5d9c1d61c32e899e85655944768e6bb876b6fb67 100644 (file)
@@ -225,7 +225,7 @@ public class ClusterAdminRpcService implements ClusterAdminService {
         final scala.concurrent.Promise<Object> makeLeaderLocalAsk = akka.dispatch.Futures.promise();
         localShardReply.onComplete(new OnComplete<ActorRef>() {
             @Override
-            public void onComplete(final Throwable failure, final ActorRef actorRef) throws Throwable {
+            public void onComplete(final Throwable failure, final ActorRef actorRef) {
                 if (failure != null) {
                     LOG.warn("No local shard found for {} datastoreType {} - Cannot request leadership transfer to"
                                     + " local shard.", shardName, failure);
@@ -241,7 +241,7 @@ public class ClusterAdminRpcService implements ClusterAdminService {
         final SettableFuture<RpcResult<MakeLeaderLocalOutput>> future = SettableFuture.create();
         makeLeaderLocalAsk.future().onComplete(new OnComplete<Object>() {
             @Override
-            public void onComplete(final Throwable failure, final Object success) throws Throwable {
+            public void onComplete(final Throwable failure, final Object success) {
                 if (failure != null) {
                     LOG.error("Leadership transfer failed for shard {}.", shardName, failure);
                     future.set(RpcResultBuilder.<MakeLeaderLocalOutput>failed().withError(ErrorType.APPLICATION,
index d40ec55b94ac96caa4dcd0a7f01de091e3685f74..6bd7a053b0bcc9480cd7ff42d3f67379a06ef805 100644 (file)
@@ -31,7 +31,7 @@ public abstract class AbstractUntypedActor extends UntypedActor implements Execu
     }
 
     @Override
-    public final void onReceive(final Object message) throws Exception {
+    public final void onReceive(final Object message) {
         if (message instanceof ExecuteInSelfMessage) {
             ((ExecuteInSelfMessage) message).run();
         } else {
@@ -44,9 +44,8 @@ public abstract class AbstractUntypedActor extends UntypedActor implements Execu
      * it should call {@link #ignoreMessage(Object)} or {@link #unknownMessage(Object)}.
      *
      * @param message the incoming message
-     * @throws Exception on message failure
      */
-    protected abstract void handleReceive(Object message) throws Exception;
+    protected abstract void handleReceive(Object message);
 
     protected final void ignoreMessage(final Object message) {
         LOG.debug("Ignoring unhandled message {}", message);
index 7058e77d87b235da2de3dc77f913fb4a486121fa..e9aaa65453c4b14fc40de1451a668a3091699fa9 100644 (file)
@@ -63,7 +63,7 @@ public abstract class AbstractUntypedPersistentActor extends UntypedPersistentAc
         LOG.debug("Unhandled message {} ", message);
     }
 
-    protected void unknownMessage(final Object message) throws Exception {
+    protected void unknownMessage(final Object message) {
         LOG.debug("Received unhandled message {}", message);
         unhandled(message);
     }
index 5363661c0e69518027647ef5c905188ff0d6735c..be31081e935927e0ed7e8f5639061c14cdc74be1 100644 (file)
@@ -11,7 +11,6 @@ package org.opendaylight.controller.cluster.datastore.node.utils.transformer;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
-import java.io.IOException;
 import java.net.URI;
 import java.util.LinkedList;
 import java.util.List;
@@ -51,7 +50,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
     @SuppressWarnings("unchecked")
     @Override
     public void leafNode(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, Object value)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
 
         checkNotSealed();
 
@@ -73,7 +72,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startLeafSet(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.leafSetBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -81,7 +80,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startOrderedLeafSet(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int str)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.orderedLeafSetBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -89,7 +88,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @SuppressWarnings({ "unchecked" })
     @Override
-    public void leafSetEntryNode(QName name, Object value) throws IOException, IllegalArgumentException {
+    public void leafSetEntryNode(QName name, Object value) throws IllegalArgumentException {
         checkNotSealed();
 
         NormalizedNodeBuilderWrapper parent = stack.peek();
@@ -113,7 +112,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startContainerNode(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.containerBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -121,13 +120,13 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startYangModeledAnyXmlNode(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         throw new UnsupportedOperationException("Not implemented yet");
     }
 
     @Override
     public void startUnkeyedList(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.unkeyedListBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -135,7 +134,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startUnkeyedListItem(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalStateException {
+            throws IllegalStateException {
         checkNotSealed();
 
         addBuilder(Builders.unkeyedListEntryBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -143,7 +142,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startMapNode(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.mapBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -151,7 +150,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startMapEntryNode(YangInstanceIdentifier.NodeIdentifierWithPredicates nodeIdentifierWithPredicates,
-            int count)  throws IOException, IllegalArgumentException {
+            int count)  throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.mapEntryBuilder().withNodeIdentifier(nodeIdentifierWithPredicates),
@@ -160,7 +159,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startOrderedMapNode(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.orderedMapBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -168,7 +167,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startChoiceNode(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.choiceBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -176,7 +175,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startAugmentationNode(YangInstanceIdentifier.AugmentationIdentifier augmentationIdentifier)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
 
         checkNotSealed();
 
@@ -186,7 +185,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
     @SuppressWarnings("unchecked")
     @Override
     public void anyxmlNode(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, Object value)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         NormalizedNodeBuilderWrapper parent = stack.peek();
@@ -208,7 +207,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @SuppressWarnings("unchecked")
     @Override
-    public void endNode() throws IOException, IllegalStateException {
+    public void endNode() throws IllegalStateException {
         checkNotSealed();
 
         NormalizedNodeBuilderWrapper child = stack.pop();
@@ -232,12 +231,12 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
     }
 
     @Override
-    public void close() throws IOException {
+    public void close() {
         sealed = true;
     }
 
     @Override
-    public void flush() throws IOException {
+    public void flush() {
 
     }
 
index 95f1372a054bcc603ac73263fad299ab85798e7b..89f9dd12e050aab2e99da50cf1e945a2fccf4ab5 100644 (file)
@@ -99,7 +99,7 @@ public class RoleChangeNotifier extends AbstractUntypedActor implements AutoClos
     }
 
     @Override
-    public void close() throws Exception {
+    public void close() {
         registeredListeners.clear();
     }
 }
index a40297438d24362295a7f7ab9b0df304c6652d9c..9c909e519a503e33b661ab744c37188e55f45b3c 100644 (file)
@@ -28,13 +28,13 @@ public class MeteredBoundedMailboxTest {
     private final ReentrantLock lock = new ReentrantLock();
 
     @BeforeClass
-    public static void setUp() throws Exception {
+    public static void setUp() {
         config = new CommonConfig.Builder<>("testsystem").withConfigReader(ConfigFactory::load).build();
         actorSystem = ActorSystem.create("testsystem", config.get());
     }
 
     @AfterClass
-    public static void tearDown() throws Exception {
+    public static void tearDown() {
         if (actorSystem != null) {
             actorSystem.terminate();
             actorSystem = null;
@@ -42,7 +42,7 @@ public class MeteredBoundedMailboxTest {
     }
 
     @Test
-    public void shouldSendMsgToDeadLetterWhenQueueIsFull() throws InterruptedException {
+    public void shouldSendMsgToDeadLetterWhenQueueIsFull() {
         final TestKit mockReceiver = new TestKit(actorSystem);
         actorSystem.eventStream().subscribe(mockReceiver.testActor(), DeadLetter.class);
 
@@ -86,7 +86,7 @@ public class MeteredBoundedMailboxTest {
         }
 
         @Override
-        public void onReceive(final Object message) throws Exception {
+        public void onReceive(final Object message) {
             lock.lock();
             try {
                 if ("ping".equals(message)) {
index 1a72f20d365d84b21166e13fbe04bd3ec220e622..ceb21e13418c916236d3b3df91bb98f3bc5baac7 100644 (file)
@@ -38,14 +38,14 @@ public class QuarantinedMonitorActorTest {
     private ActorRef actor;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
         system = ActorSystem.apply();
         actor = system.actorOf(QuarantinedMonitorActor.props(callback));
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 
index ea89e2096a280bfb15925eb1c299254254133a61..6b24b05a735b912b15dcacec61d69a6898521f8c 100644 (file)
@@ -12,7 +12,6 @@ import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
-import java.net.URISyntaxException;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter;
@@ -31,7 +30,7 @@ public class SampleNormalizedNodeSerializable implements Serializable {
     }
 
     private void readObject(final ObjectInputStream stream)
-            throws IOException, ClassNotFoundException, URISyntaxException {
+            throws IOException {
         NormalizedNodeDataInput reader = NormalizedNodeInputOutput.newDataInput(stream);
         this.input = reader.readNormalizedNode();
     }
index eb579ae7b595636c81179d9fe25772d87f678287..50d06ada231c23ca611d1ad0234288ed9bedfce3 100644 (file)
@@ -47,7 +47,7 @@ public class SerializationUtilsTest {
     private static final QName CONTAINER_Q_NAME = QName.create("ns-1", "2017-03-17", "container1");
 
     @Test
-    public void testSerializeDeserializeNodes() throws Exception {
+    public void testSerializeDeserializeNodes() {
         final NormalizedNode<?, ?> normalizedNode = createNormalizedNode();
         final byte[] bytes = SerializationUtils.serializeNormalizedNode(normalizedNode);
         Assert.assertEquals(normalizedNode, SerializationUtils.deserializeNormalizedNode(bytes));
@@ -72,7 +72,7 @@ public class SerializationUtilsTest {
     }
 
     @Test
-    public void testSerializeDeserializePath() throws Exception {
+    public void testSerializeDeserializePath() {
         final ByteArrayOutputStream bos = new ByteArrayOutputStream();
         final DataOutput out = new DataOutputStream(bos);
         final YangInstanceIdentifier path = YangInstanceIdentifier.builder()
@@ -88,7 +88,7 @@ public class SerializationUtilsTest {
     }
 
     @Test
-    public void testSerializeDeserializePathAndNode() throws Exception {
+    public void testSerializeDeserializePathAndNode() {
         final ByteArrayOutputStream bos = new ByteArrayOutputStream();
         final DataOutput out = new DataOutputStream(bos);
         final NormalizedNode<?, ?> node = createNormalizedNode();
index 7e5392263278e3685629e4d24e966554ab94c653..b0e0c55f18e4428557e029738c10df6dc3b38935 100644 (file)
@@ -50,7 +50,7 @@ public class AbstractMessagingTest {
     protected InputStream mockInputStream;
 
     @BeforeClass
-    public static void setupClass() throws IOException {
+    public static void setupClass() {
         ACTOR_SYSTEM = ActorSystem.create("test");
     }
 
index 209943e83c7012f1256aec5fa4c8189cfe17112b..3226bfec1dd9e927a92024d8a7c33aac8cf900f2 100644 (file)
@@ -138,7 +138,7 @@ public class MessageAssemblerTest extends AbstractMessagingTest {
     }
 
     @Test
-    public void testAssembledMessageStateExpiration() throws IOException {
+    public void testAssembledMessageStateExpiration() {
         final int expiryDuration = 200;
         try (MessageAssembler assembler = newMessageAssemblerBuilder("testAssembledMessageStateExpiration")
                 .expireStateAfterInactivity(expiryDuration, TimeUnit.MILLISECONDS).build()) {
index c361963acacf2e1d4df872a0a25aba03cfb484ba..63b3707e516957e40c6295283ce2797e4f8c672d 100644 (file)
@@ -27,7 +27,7 @@ public class RoleChangeNotifierTest {
     private ActorRef notifier;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         system = ActorSystem.apply();
         notifier = system.actorOf(RoleChangeNotifier.getProps(MEMBER_ID));
         listeners = new ArrayList<>(LISTENER_COUNT);
@@ -37,12 +37,12 @@ public class RoleChangeNotifierTest {
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 
     @Test
-    public void testHandleReceiveRoleChange() throws Exception {
+    public void testHandleReceiveRoleChange() {
         registerListeners();
         final RoleChanged msg = new RoleChanged(MEMBER_ID, "old", "new");
         notifier.tell(msg, ActorRef.noSender());
@@ -50,7 +50,7 @@ public class RoleChangeNotifierTest {
     }
 
     @Test
-    public void testHandleReceiveLeaderStateChanged() throws Exception {
+    public void testHandleReceiveLeaderStateChanged() {
         registerListeners();
         final LeaderStateChanged msg = new LeaderStateChanged(MEMBER_ID, "leader", (short) 0);
         notifier.tell(msg, ActorRef.noSender());
@@ -58,7 +58,7 @@ public class RoleChangeNotifierTest {
     }
 
     @Test
-    public void testHandleReceiveRegistrationAfterRoleChange() throws Exception {
+    public void testHandleReceiveRegistrationAfterRoleChange() {
         final RoleChanged roleChanged1 = new RoleChanged(MEMBER_ID, "old1", "new1");
         final RoleChanged lastRoleChanged = new RoleChanged(MEMBER_ID, "old2", "new2");
         notifier.tell(roleChanged1, ActorRef.noSender());
@@ -68,7 +68,7 @@ public class RoleChangeNotifierTest {
     }
 
     @Test
-    public void testHandleReceiveRegistrationAfterLeaderStateChange() throws Exception {
+    public void testHandleReceiveRegistrationAfterLeaderStateChange() {
         final LeaderStateChanged leaderStateChanged1 = new LeaderStateChanged(MEMBER_ID, "leader1", (short) 0);
         final LeaderStateChanged lastLeaderStateChanged = new LeaderStateChanged(MEMBER_ID, "leader2", (short) 1);
         notifier.tell(leaderStateChanged1, ActorRef.noSender());
index e23a37a8aece97c88bc0b3644402999f1395f8c3..36a7295591f6e7f644be0c08850669c8d326d426 100644 (file)
@@ -123,7 +123,7 @@ public class LocalSnapshotStoreTest {
     }
 
     @Test
-    public void testDoLoadAsyncWithNoSnapshots() throws IOException {
+    public void testDoLoadAsyncWithNoSnapshots() {
         TestKit probe = new TestKit(system);
         snapshotStore.tell(new LoadSnapshot(PERSISTENCE_ID,
                 SnapshotSelectionCriteria.latest(), Long.MAX_VALUE), probe.getRef());
index e86c1eb64037008df6b0cbfaf6065aaf55695a69..e2a1d551daa0a6e94c9341ca0b5b462348b03147 100644 (file)
@@ -345,7 +345,7 @@ public abstract class DataNormalizationOperation<T extends PathArgument> impleme
 
         @Override
         protected DataNormalizationOperation<?> fromLocalSchemaAndQName(final DataNodeContainer schema,
-                final QName child) throws DataNormalizationException {
+                final QName child) {
             final Optional<DataSchemaNode> potential = findChildSchemaNode(schema, child);
             if (!potential.isPresent()) {
                 return null;
@@ -497,12 +497,12 @@ public abstract class DataNormalizationOperation<T extends PathArgument> impleme
         }
 
         @Override
-        public DataNormalizationOperation<?> getChild(final PathArgument child) throws DataNormalizationException {
+        public DataNormalizationOperation<?> getChild(final PathArgument child) {
             return null;
         }
 
         @Override
-        public DataNormalizationOperation<?> getChild(final QName child) throws DataNormalizationException {
+        public DataNormalizationOperation<?> getChild(final QName child) {
             return null;
         }
 
index 42c054166297b68cf9a17f09fe76906e0dc20f73..072f8ede80c978987e78767f0df019f56efa6438 100644 (file)
@@ -180,8 +180,7 @@ abstract class AbstractFrontendHistory implements Identifiable<LocalHistoryIdent
         tree.removeTransactionChain(getIdentifier());
     }
 
-    private FrontendTransaction createTransaction(final TransactionRequest<?> request, final TransactionIdentifier id)
-            throws RequestException {
+    private FrontendTransaction createTransaction(final TransactionRequest<?> request, final TransactionIdentifier id) {
         if (request instanceof CommitLocalTransactionRequest) {
             LOG.debug("{}: allocating new ready transaction {}", persistenceId(), id);
             tree.getStats().incrementReadWriteTransactionCount();
@@ -199,12 +198,12 @@ abstract class AbstractFrontendHistory implements Identifiable<LocalHistoryIdent
         return createOpenTransaction(id);
     }
 
-    abstract FrontendTransaction createOpenSnapshot(TransactionIdentifier id) throws RequestException;
+    abstract FrontendTransaction createOpenSnapshot(TransactionIdentifier id);
 
-    abstract FrontendTransaction createOpenTransaction(TransactionIdentifier id) throws RequestException;
+    abstract FrontendTransaction createOpenTransaction(TransactionIdentifier id);
 
     abstract FrontendTransaction createReadyTransaction(TransactionIdentifier id, DataTreeModification mod)
-        throws RequestException;
+        ;
 
     abstract ShardDataTreeCohort createFailedCohort(TransactionIdentifier id, DataTreeModification mod,
             Exception failure);
index fb9fbdcb8e7fde4864d1826aa92f0bfcfd3c25da..81400a2f0458bc2f8486944fffdc3fdecd30cd9b 100644 (file)
@@ -82,15 +82,13 @@ final class FrontendReadOnlyTransaction extends FrontendTransaction {
             new ModifyTransactionSuccess(request.getTarget(), request.getSequence())));
     }
 
-    private ExistsTransactionSuccess handleExistsTransaction(final ExistsTransactionRequest request)
-            throws RequestException {
+    private ExistsTransactionSuccess handleExistsTransaction(final ExistsTransactionRequest request) {
         final Optional<NormalizedNode<?, ?>> data = openTransaction.getSnapshot().readNode(request.getPath());
         return recordSuccess(request.getSequence(), new ExistsTransactionSuccess(openTransaction.getIdentifier(),
             request.getSequence(), data.isPresent()));
     }
 
-    private ReadTransactionSuccess handleReadTransaction(final ReadTransactionRequest request)
-            throws RequestException {
+    private ReadTransactionSuccess handleReadTransaction(final ReadTransactionRequest request) {
         final Optional<NormalizedNode<?, ?>> data = openTransaction.getSnapshot().readNode(request.getPath());
         return recordSuccess(request.getSequence(), new ReadTransactionSuccess(openTransaction.getIdentifier(),
             request.getSequence(), data));
index 9c39d823fe5536a222ef3a99fa2abdac7b70d677..e2ae16f097fb1bac74a74065fe252bb3d389d692 100644 (file)
@@ -524,15 +524,13 @@ final class FrontendReadWriteTransaction extends FrontendTransaction {
         }
     }
 
-    private ExistsTransactionSuccess handleExistsTransaction(final ExistsTransactionRequest request)
-            throws RequestException {
+    private ExistsTransactionSuccess handleExistsTransaction(final ExistsTransactionRequest request) {
         final Optional<NormalizedNode<?, ?>> data = checkOpen().getSnapshot().readNode(request.getPath());
         return recordSuccess(request.getSequence(), new ExistsTransactionSuccess(getIdentifier(), request.getSequence(),
             data.isPresent()));
     }
 
-    private ReadTransactionSuccess handleReadTransaction(final ReadTransactionRequest request)
-            throws RequestException {
+    private ReadTransactionSuccess handleReadTransaction(final ReadTransactionRequest request) {
         final Optional<NormalizedNode<?, ?>> data = checkOpen().getSnapshot().readNode(request.getPath());
         return recordSuccess(request.getSequence(), new ReadTransactionSuccess(getIdentifier(), request.getSequence(),
             data));
index b37e2d8bf1603f70338e98543b6b5a93fc642d8a..7611b029ca53a4562753d7346f86db26daef02db 100644 (file)
@@ -157,8 +157,7 @@ final class LeaderFrontendState implements Identifiable<ClientIdentifier> {
     }
 
     private LocalHistorySuccess handleDestroyHistory(final DestroyLocalHistoryRequest request,
-            final RequestEnvelope envelope, final long now)
-            throws RequestException {
+            final RequestEnvelope envelope, final long now) {
         final LocalHistoryIdentifier id = request.getTarget();
         final LocalFrontendHistory existing = localHistories.get(id);
         if (existing == null) {
@@ -172,7 +171,7 @@ final class LeaderFrontendState implements Identifiable<ClientIdentifier> {
     }
 
     private LocalHistorySuccess handlePurgeHistory(final PurgeLocalHistoryRequest request,
-            final RequestEnvelope envelope, final long now) throws RequestException {
+            final RequestEnvelope envelope, final long now) {
         final LocalHistoryIdentifier id = request.getTarget();
         final LocalFrontendHistory existing = localHistories.remove(id);
         if (existing == null) {
index 73d2c9f805a530fc2c5de9ea6bcee49bf9bcb481..17e861a3e7252a9c269801bc00a2ebe9ec31d66b 100644 (file)
@@ -17,7 +17,6 @@ import java.util.Map;
 import java.util.Optional;
 import java.util.SortedSet;
 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
-import org.opendaylight.controller.cluster.access.concepts.RequestException;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
 
@@ -55,18 +54,17 @@ final class LocalFrontendHistory extends AbstractFrontendHistory {
     }
 
     @Override
-    FrontendTransaction createOpenSnapshot(final TransactionIdentifier id) throws RequestException {
+    FrontendTransaction createOpenSnapshot(final TransactionIdentifier id) {
         return FrontendReadOnlyTransaction.create(this, chain.newReadOnlyTransaction(id));
     }
 
     @Override
-    FrontendTransaction createOpenTransaction(final TransactionIdentifier id) throws RequestException {
+    FrontendTransaction createOpenTransaction(final TransactionIdentifier id) {
         return FrontendReadWriteTransaction.createOpen(this, chain.newReadWriteTransaction(id));
     }
 
     @Override
-    FrontendTransaction createReadyTransaction(final TransactionIdentifier id, final DataTreeModification mod)
-            throws RequestException {
+    FrontendTransaction createReadyTransaction(final TransactionIdentifier id, final DataTreeModification mod) {
         return FrontendReadWriteTransaction.createReady(this, id, mod);
     }
 
index 8d0068172a65eea7124b890354961ab68b1986b0..1f8800f5d34fea884d483ff9a1d39bf082799b06 100644 (file)
@@ -78,7 +78,7 @@ class LocalThreePhaseCommitCohort implements DOMStoreThreePhaseCommitCohort {
                 transaction.getIdentifier());
         ret.onComplete(new OnComplete<ActorSelection>() {
             @Override
-            public void onComplete(final Throwable failure, final ActorSelection success) throws Throwable {
+            public void onComplete(final Throwable failure, final ActorSelection success) {
                 if (failure != null) {
                     LOG.info("Failed to prepare transaction {} on backend", transaction.getIdentifier(), failure);
                     transactionAborted(transaction);
@@ -96,7 +96,7 @@ class LocalThreePhaseCommitCohort implements DOMStoreThreePhaseCommitCohort {
         final Future<Object> messageFuture = initiateCommit(true, Optional.empty());
         messageFuture.onComplete(new OnComplete<Object>() {
             @Override
-            public void onComplete(final Throwable failure, final Object message) throws Throwable {
+            public void onComplete(final Throwable failure, final Object message) {
                 if (failure != null) {
                     LOG.error("Failed to prepare transaction {} on backend", transaction.getIdentifier(), failure);
                     transactionAborted(transaction);
index 5f1e67e988e60ccca5f434f2e04358cd484ba8b9..980d1817700444ee459a43399a62cd67ea2248fb 100644 (file)
@@ -315,7 +315,7 @@ public class ShardDataTree extends ShardDataTreeTransactionParent {
     }
 
     @SuppressWarnings("checkstyle:IllegalCatch")
-    private void applyRecoveryCandidate(final DataTreeCandidate candidate) throws DataValidationFailedException {
+    private void applyRecoveryCandidate(final DataTreeCandidate candidate) {
         final PruningDataTreeModification mod = wrapWithPruning(dataTree.takeSnapshot().newModification());
         DataTreeCandidates.applyToModification(mod, candidate);
         mod.ready();
@@ -344,7 +344,7 @@ public class ShardDataTree extends ShardDataTreeTransactionParent {
      * @throws IOException when the snapshot fails to deserialize
      * @throws DataValidationFailedException when the snapshot fails to apply
      */
-    void applyRecoveryPayload(@Nonnull final Payload payload) throws IOException, DataValidationFailedException {
+    void applyRecoveryPayload(@Nonnull final Payload payload) throws IOException {
         if (payload instanceof CommitTransactionPayload) {
             final Entry<TransactionIdentifier, DataTreeCandidate> e =
                     ((CommitTransactionPayload) payload).getCandidate();
index ffdf126c3cf5e1cd349706bacaf8ae2ed5c1940d..8961a1a7553edcf91691f9e29f40a4056c41b2b5 100644 (file)
@@ -140,7 +140,7 @@ public abstract class ShardTransaction extends AbstractUntypedActorWithMetering
         }
 
         @Override
-        public ShardTransaction create() throws Exception {
+        public ShardTransaction create() {
             final ShardTransaction tx;
             switch (type) {
                 case READ_ONLY:
index 3d4e373f33b926309236beb0c29ff2f146524651..8beb44d50f89d3e6a7af4bec4d0b9afa838b5c3d 100644 (file)
@@ -18,7 +18,6 @@ import java.util.Optional;
 import java.util.SortedSet;
 import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
-import org.opendaylight.controller.cluster.access.concepts.RequestException;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
 
@@ -59,18 +58,17 @@ final class StandaloneFrontendHistory extends AbstractFrontendHistory {
     }
 
     @Override
-    FrontendTransaction createOpenSnapshot(final TransactionIdentifier id) throws RequestException {
+    FrontendTransaction createOpenSnapshot(final TransactionIdentifier id) {
         return FrontendReadOnlyTransaction.create(this, tree.newReadOnlyTransaction(id));
     }
 
     @Override
-    FrontendTransaction createOpenTransaction(final TransactionIdentifier id) throws RequestException {
+    FrontendTransaction createOpenTransaction(final TransactionIdentifier id) {
         return FrontendReadWriteTransaction.createOpen(this, tree.newReadWriteTransaction(id));
     }
 
     @Override
-    FrontendTransaction createReadyTransaction(final TransactionIdentifier id, final DataTreeModification mod)
-            throws RequestException {
+    FrontendTransaction createReadyTransaction(final TransactionIdentifier id, final DataTreeModification mod) {
         return FrontendReadWriteTransaction.createReady(this, id, mod);
     }
 
index 5ab85f1db261cae9e77c54954e84f98ade4ddae6..c596f12a091ec394f9bb3d55f71341ab4e10308a 100644 (file)
@@ -23,7 +23,7 @@ public class TerminationMonitor extends UntypedActor {
     }
 
     @Override
-    public void onReceive(Object message) throws Exception {
+    public void onReceive(Object message) {
         if (message instanceof Terminated) {
             Terminated terminated = (Terminated) message;
             LOG.debug("Actor terminated : {}", terminated.actor());
index 90dcec238aa13f302d429aa1b2e38c7d78b81d67..a78b9a2ef6294dbd04d896b4270e69c02fbd13ce 100644 (file)
@@ -316,7 +316,7 @@ public class ThreePhaseCommitCohortProxy extends AbstractThreePhaseCommitCohort<
 
         combinedFuture.onComplete(new OnComplete<Iterable<Object>>() {
             @Override
-            public void onComplete(final Throwable failure, final Iterable<Object> responses) throws Throwable {
+            public void onComplete(final Throwable failure, final Iterable<Object> responses) {
                 Throwable exceptionToPropagate = failure;
                 if (exceptionToPropagate == null) {
                     for (Object response: responses) {
index 2a60abbc46827fca03ca62be80eeac22f025b5be..6ab4247310dfce5d96d6716f1841a2f8d63cee21 100644 (file)
@@ -34,7 +34,7 @@ public final class DataTreeNotificationListenerRegistrationActor extends Abstrac
     private Cancellable killSchedule;
 
     @Override
-    protected void handleReceive(Object message) throws Exception {
+    protected void handleReceive(Object message) {
         if (message instanceof CloseDataTreeNotificationListenerRegistration) {
             closeListenerRegistration();
             if (isValidSender(getSender())) {
index 4796e1c37f466cb4c2c94c281dbcc4ab0275b47c..14cf4cd1a3ec2d58552a3a86377f9da3127b04ac 100644 (file)
@@ -60,7 +60,7 @@ public final class ShardSnapshotActor extends AbstractUntypedActorWithMetering {
     }
 
     @Override
-    protected void handleReceive(final Object message) throws Exception {
+    protected void handleReceive(final Object message) {
         if (message instanceof SerializeSnapshot) {
             onSerializeSnapshot((SerializeSnapshot) message);
         } else {
index 0acc296fc60ecd176f0ef839f4a35bfe5ebd466f..4ac28a6719a07f0c4d368d354625f533e0f4983c 100644 (file)
@@ -55,13 +55,7 @@ public final class EntityOwnerSelectionStrategyConfigReader {
             }
 
             final String[] strategyClassAndDelay = ((String) properties.get(key)).split(",");
-            final Class<? extends EntityOwnerSelectionStrategy> aClass;
-            try {
-                aClass = loadClass(strategyClassAndDelay[0]);
-            } catch (final ClassNotFoundException e) {
-                LOG.error("Failed to load class {}, ignoring it", strategyClassAndDelay[0], e);
-                continue;
-            }
+            final Class<? extends EntityOwnerSelectionStrategy> aClass = loadClass(strategyClassAndDelay[0]);
 
             final long delay;
             if (strategyClassAndDelay.length > 1) {
@@ -79,8 +73,7 @@ public final class EntityOwnerSelectionStrategyConfigReader {
     }
 
     @SuppressWarnings("unchecked")
-    private static Class<? extends EntityOwnerSelectionStrategy> loadClass(final String strategyClassAndDelay)
-            throws ClassNotFoundException {
+    private static Class<? extends EntityOwnerSelectionStrategy> loadClass(final String strategyClassAndDelay) {
         final Class<?> clazz;
         try {
             clazz = EntityOwnerSelectionStrategyConfigReader.class.getClassLoader().loadClass(strategyClassAndDelay);
index 3e968a4eab96cf1327bdd241305eb02c7c7a20d2..3b5c6b3b8c89e81e0df5d0aac2c283f17ce893b9 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.controller.cluster.datastore.messages;
 
-import java.io.ObjectStreamException;
 import java.io.Serializable;
 
 public final class CloseDataTreeNotificationListenerRegistration implements Serializable {
@@ -22,7 +21,7 @@ public final class CloseDataTreeNotificationListenerRegistration implements Seri
         return INSTANCE;
     }
 
-    private Object readResolve() throws ObjectStreamException {
+    private Object readResolve() {
         return INSTANCE;
     }
 }
index 1a6a485b5f6359f0aa290b81a21229267b9f05b6..0bc5254c1459a47dc19bb2e505738558168d5e69 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.controller.cluster.datastore.messages;
 
-import java.io.ObjectStreamException;
 import java.io.Serializable;
 
 public final class CloseDataTreeNotificationListenerRegistrationReply implements Serializable {
@@ -23,7 +22,7 @@ public final class CloseDataTreeNotificationListenerRegistrationReply implements
         return INSTANCE;
     }
 
-    private Object readResolve() throws ObjectStreamException {
+    private Object readResolve() {
         return INSTANCE;
     }
 }
index e4a8d74a7d118f6889ff249cfc53f2fc32f41860..d50079e6a12f7bb3f702c3092df5ee1a3ec13711 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.controller.cluster.datastore.messages;
 
-import java.io.ObjectStreamException;
 import java.io.Serializable;
 
 public final class DataTreeChangedReply implements Serializable {
@@ -22,7 +21,7 @@ public final class DataTreeChangedReply implements Serializable {
         return INSTANCE;
     }
 
-    private Object readResolve() throws ObjectStreamException {
+    private Object readResolve() {
         return INSTANCE;
     }
 }
index 0b7b262a9dd3029a57f12fa417a858295e1171a0..c7ee83a819fe05dc73f1e2003563bf049e89ce62 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.controller.cluster.datastore.messages;
 
 import java.io.Externalizable;
-import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
@@ -20,10 +19,10 @@ import java.io.ObjectOutput;
 public class EmptyExternalizable implements Externalizable {
 
     @Override
-    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    public void readExternal(ObjectInput in) {
     }
 
     @Override
-    public void writeExternal(ObjectOutput out) throws IOException {
+    public void writeExternal(ObjectOutput out) {
     }
 }
index 168b80a2080886afb12caf2ce5d1f040f8715e7f..347cde9f3fed6f727a96350e386d952a4bd513a9 100644 (file)
@@ -8,7 +8,6 @@
 
 package org.opendaylight.controller.cluster.datastore.modification;
 
-import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import org.opendaylight.controller.cluster.datastore.DataStoreVersions;
@@ -51,17 +50,16 @@ public class DeleteModification extends AbstractModification {
     }
 
     @Override
-    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    public void readExternal(ObjectInput in) {
         setPath(SerializationUtils.deserializePath(in));
     }
 
     @Override
-    public void writeExternal(ObjectOutput out) throws IOException {
+    public void writeExternal(ObjectOutput out) {
         SerializationUtils.serializePath(getPath(), out);
     }
 
-    public static DeleteModification fromStream(ObjectInput in, short version)
-            throws ClassNotFoundException, IOException {
+    public static DeleteModification fromStream(ObjectInput in, short version) {
         DeleteModification mod = new DeleteModification(version);
         mod.readExternal(in);
         return mod;
index 11bb9c503db50b01edef47bd1462c566d1934204..465372736bb398769d811fd217319a1f1b694328 100644 (file)
@@ -8,7 +8,6 @@
 
 package org.opendaylight.controller.cluster.datastore.modification;
 
-import java.io.IOException;
 import java.io.ObjectInput;
 import org.opendaylight.controller.cluster.datastore.DataStoreVersions;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreWriteTransaction;
@@ -49,8 +48,7 @@ public class MergeModification extends WriteModification {
         return MERGE;
     }
 
-    public static MergeModification fromStream(ObjectInput in, short version)
-            throws ClassNotFoundException, IOException {
+    public static MergeModification fromStream(ObjectInput in, short version) {
         MergeModification mod = new MergeModification(version);
         mod.readExternal(in);
         return mod;
index 5e1d9c74c0a7491bfd21964446c2a4d97dd52627..70125e29e52a063f9e5d0e8cbe2db30d79f5d0bb 100644 (file)
@@ -8,7 +8,6 @@
 
 package org.opendaylight.controller.cluster.datastore.modification;
 
-import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import org.opendaylight.controller.cluster.datastore.DataStoreVersions;
@@ -60,17 +59,16 @@ public class WriteModification extends AbstractModification {
     }
 
     @Override
-    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+    public void readExternal(ObjectInput in) {
         SerializationUtils.deserializePathAndNode(in, this, APPLIER);
     }
 
     @Override
-    public void writeExternal(ObjectOutput out) throws IOException {
+    public void writeExternal(ObjectOutput out) {
         SerializationUtils.serializePathAndNode(getPath(), data, out);
     }
 
-    public static WriteModification fromStream(ObjectInput in, short version)
-            throws ClassNotFoundException, IOException {
+    public static WriteModification fromStream(ObjectInput in, short version) {
         WriteModification mod = new WriteModification(version);
         mod.readExternal(in);
         return mod;
index b0ad960cb84af19642cdd8571ee48ba6b5fbe684..f5a210159fdcde3603e752b2550acb985ce4657c 100644 (file)
@@ -48,7 +48,7 @@ public abstract class AbstractIdentifiablePayload<T extends Identifier>
         }
 
         @Override
-        public final void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
+        public final void readExternal(final ObjectInput in) throws IOException {
             final int length = in.readInt();
             serialized = new byte[length];
             in.readFully(serialized);
index 080ecfbe4a19f29601717782270c440749969b5c..213d61b8dda72ad24b6eb3577d43dad0d0d859ab 100644 (file)
@@ -53,7 +53,7 @@ public final class CommitTransactionPayload extends Payload implements Serializa
         }
 
         @Override
-        public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
+        public void readExternal(final ObjectInput in) throws IOException {
             final int length = in.readInt();
             serialized = new byte[length];
             in.readFully(serialized);
index 48f0a1eb13ee3ea6eac03099ccaae8b27c644104..4598f68a449c003e43e801af465d50c900f1f3d5 100644 (file)
@@ -67,7 +67,7 @@ public final class FrontendClientMetadata implements Identifiable<ClientIdentifi
         }
     }
 
-    public static FrontendClientMetadata readFrom(final DataInput in) throws IOException, ClassNotFoundException {
+    public static FrontendClientMetadata readFrom(final DataInput in) throws IOException {
         final ClientIdentifier id = ClientIdentifier.readFrom(in);
 
         final int purgedSize = in.readInt();
index 86e6f3a4e07ad0edd790835a0eb4ccb630cf091f..b7b1261192aeebe9ba8e689d7cff8d4bd12ba4e5 100644 (file)
@@ -46,7 +46,7 @@ public final class FrontendShardDataTreeSnapshotMetadata extends
         }
 
         @Override
-        public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
+        public void readExternal(final ObjectInput in) throws IOException {
             final int size = in.readInt();
             final List<FrontendClientMetadata> readedClients = new ArrayList<>(size);
             for (int i = 0; i < size ; ++i) {
index 5275582f079ba188eb71bf7fcc1c15bd6c082af1..8f22c0ec2dc2b2fe5bed0033b2bd18657263c27d 100644 (file)
@@ -46,7 +46,7 @@ public class ShardSnapshotState implements Snapshot.State {
         }
 
         @Override
-        public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
+        public void readExternal(final ObjectInput in) throws IOException {
             snapshotState = new ShardSnapshotState(ShardDataTreeSnapshot.deserialize(in));
         }
 
index bc90716af7024a9bbe7323f8aa485ebd05f249e8..da328566a040bb6797f41a7536afe60233c692d7 100644 (file)
@@ -116,7 +116,7 @@ final class CDSShardAccessImpl implements CDSShardAccess, LeaderLocationListener
         final scala.concurrent.Promise<Object> makeLeaderLocalAsk = Futures.promise();
         localShardReply.onComplete(new OnComplete<ActorRef>() {
             @Override
-            public void onComplete(final Throwable failure, final ActorRef actorRef) throws Throwable {
+            public void onComplete(final Throwable failure, final ActorRef actorRef) {
                 if (failure instanceof LocalShardNotFoundException) {
                     LOG.debug("No local shard found for {} - Cannot request leadership transfer to local shard.",
                             getShardIdentifier(), failure);
index 235cc5df306162ef9d9af9aa4b62eafff4b98ad4..7f727fa36b4ab142ecb8d2cc37c53ce858b7ba8e 100644 (file)
@@ -238,17 +238,8 @@ public class DistributedShardedDOMDataTree implements DOMDataTreeService, DOMDat
 
 
         //create shard registration for DEFAULT_SHARD
-        try {
-            initDefaultShard(LogicalDatastoreType.CONFIGURATION);
-        } catch (final InterruptedException | ExecutionException e) {
-            throw new IllegalStateException("Unable to create default shard frontend for config shard", e);
-        }
-
-        try {
-            initDefaultShard(LogicalDatastoreType.OPERATIONAL);
-        } catch (final InterruptedException | ExecutionException e) {
-            throw new IllegalStateException("Unable to create default shard frontend for operational shard", e);
-        }
+        initDefaultShard(LogicalDatastoreType.CONFIGURATION);
+        initDefaultShard(LogicalDatastoreType.OPERATIONAL);
     }
 
     private ListenableFuture<List<Void>> handleConfigShardLookup() {
@@ -267,7 +258,7 @@ public class DistributedShardedDOMDataTree implements DOMDataTreeService, DOMDat
 
         ask.onComplete(new OnComplete<Object>() {
             @Override
-            public void onComplete(final Throwable throwable, final Object result) throws Throwable {
+            public void onComplete(final Throwable throwable, final Object result) {
                 if (throwable != null) {
                     future.setException(throwable);
                 } else {
@@ -510,8 +501,7 @@ public class DistributedShardedDOMDataTree implements DOMDataTreeService, DOMDat
     }
 
     @SuppressWarnings("checkstyle:IllegalCatch")
-    private void initDefaultShard(final LogicalDatastoreType logicalDatastoreType)
-            throws ExecutionException, InterruptedException {
+    private void initDefaultShard(final LogicalDatastoreType logicalDatastoreType) {
 
         final PrefixedShardConfigWriter writer = writerMap.get(logicalDatastoreType);
 
index 3307089a45971f6e4879087ff27eb081597af2f2..d33ad50c09396b69153371f2c8f2fb3771d68e3d 100644 (file)
@@ -41,7 +41,7 @@ public final class RoleChangeListenerActor extends AbstractUntypedActor {
     }
 
     @Override
-    protected void handleReceive(final Object message) throws Exception {
+    protected void handleReceive(final Object message) {
         if (message instanceof RoleChangeNotification) {
             ignoreMessage(message);
         } else if (message instanceof LeaderStateChanged) {
index d0df84893d2d7f75ff91d49a5bd0cb4eec13fddc..8e8ff491d3088db64eb1c013c3ae2cb2433b1221 100644 (file)
@@ -8,8 +8,6 @@
 
 package org.opendaylight.controller.cluster.sharding;
 
-import static akka.actor.ActorRef.noSender;
-
 import akka.actor.ActorRef;
 import akka.actor.ActorSelection;
 import akka.actor.ActorSystem;
@@ -119,12 +117,12 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
     }
 
     @Override
-    protected void handleRecover(final Object message) throws Exception {
+    protected void handleRecover(final Object message) {
         LOG.debug("Received a recover message {}", message);
     }
 
     @Override
-    protected void handleCommand(final Object message) throws Exception {
+    protected void handleCommand(final Object message) {
         LOG.debug("{} : Received {}", clusterWrapper.getCurrentMemberName(), message);
         if (message instanceof ClusterEvent.MemberUp) {
             memberUp((ClusterEvent.MemberUp) message);
@@ -219,7 +217,7 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
 
         // fastpath if we have no peers
         if (resolver.getShardingServicePeerActorAddresses().isEmpty()) {
-            getSender().tell(new Status.Success(null), noSender());
+            getSender().tell(new Status.Success(null), ActorRef.noSender());
         }
 
         final ActorRef sender = getSender();
@@ -240,7 +238,7 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
                 futures.toArray(new CompletableFuture[futures.size()]));
 
         combinedFuture
-                .thenRun(() -> sender.tell(new Success(null), noSender()))
+                .thenRun(() -> sender.tell(new Success(null), ActorRef.noSender()))
                 .exceptionally(throwable -> {
                     sender.tell(new Status.Failure(throwable), self());
                     return null;
@@ -295,16 +293,16 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
         final ActorProducerRegistration registration = idToProducer.remove(message.getSubtrees().iterator().next());
         if (registration == null) {
             LOG.warn("The notification contained a path on which no producer is registered, throwing away");
-            getSender().tell(new Status.Success(null), noSender());
+            getSender().tell(new Status.Success(null), ActorRef.noSender());
             return;
         }
 
         try {
             registration.close();
-            getSender().tell(new Status.Success(null), noSender());
+            getSender().tell(new Status.Success(null), ActorRef.noSender());
         } catch (final DOMDataTreeProducerException e) {
             LOG.error("Unable to close producer", e);
-            getSender().tell(new Status.Failure(e), noSender());
+            getSender().tell(new Status.Failure(e), ActorRef.noSender());
         }
     }
 
@@ -439,7 +437,7 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
 
             localShardFuture.onComplete(new OnComplete<ActorRef>() {
                 @Override
-                public void onComplete(Throwable throwable, ActorRef actorRef) throws Throwable {
+                public void onComplete(Throwable throwable, ActorRef actorRef) {
                     if (throwable != null) {
                         tryReschedule(throwable);
                     } else {
@@ -503,7 +501,7 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
 
             ask.onComplete(new OnComplete<Object>() {
                 @Override
-                public void onComplete(final Throwable throwable, final Object findLeaderReply) throws Throwable {
+                public void onComplete(final Throwable throwable, final Object findLeaderReply) {
                     if (throwable != null) {
                         tryReschedule(throwable);
                     } else {
@@ -566,7 +564,7 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
                     shardingService.lookupShardFrontend(toLookup);
 
             if (entry != null && tableEntryIdCheck(entry, toLookup) && entry.getValue() != null) {
-                replyTo.tell(new Success(null), noSender());
+                replyTo.tell(new Success(null), ActorRef.noSender());
             } else {
                 tryReschedule(null);
             }
@@ -627,12 +625,12 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
 
             localShardFuture.onComplete(new OnComplete<ActorRef>() {
                 @Override
-                public void onComplete(Throwable throwable, ActorRef actorRef) throws Throwable {
+                public void onComplete(Throwable throwable, ActorRef actorRef) {
                     if (throwable != null) {
                         //TODO Shouldn't we check why findLocalShard failed?
                         LOG.debug("Backend shard[{}] removal lookup successful notifying the registration future",
                                 toLookup);
-                        replyTo.tell(new Success(null), noSender());
+                        replyTo.tell(new Success(null), ActorRef.noSender());
                     } else {
                         tryReschedule(null);
                     }
@@ -685,7 +683,7 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
                 tryReschedule(null);
             } else {
                 LOG.debug("Local backend for prefix configuration shard lookup successful");
-                replyTo.tell(new Status.Success(null), noSender());
+                replyTo.tell(new Status.Success(null), ActorRef.noSender());
             }
         }
     }
@@ -729,7 +727,7 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
 
             ask.onComplete(new OnComplete<Object>() {
                 @Override
-                public void onComplete(final Throwable throwable, final Object findLeaderReply) throws Throwable {
+                public void onComplete(final Throwable throwable, final Object findLeaderReply) {
                     if (throwable != null) {
                         tryReschedule(throwable);
                     } else {
@@ -739,7 +737,7 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
                             // leader is found, backend seems ready, check if the frontend is ready
                             LOG.debug("{} - Leader for config shard is ready. Ending lookup.",
                                     clusterWrapper.getCurrentMemberName());
-                            replyTo.tell(new Status.Success(null), noSender());
+                            replyTo.tell(new Status.Success(null), ActorRef.noSender());
                         } else {
                             tryReschedule(null);
                         }
index cf08d3311f36b9357f3bfdd454bcc76d9e30d731..a27bc540306bbde31cc3c7999206f54faf1bca6e 100644 (file)
@@ -60,7 +60,7 @@ public class ClientBackedDataStoreTest {
     private ClientSnapshot clientSnapshot;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
 
         final SchemaContext schemaContext = TestModel.createTestContext();
@@ -77,7 +77,7 @@ public class ClientBackedDataStoreTest {
     }
 
     @Test
-    public void testCreateTransactionChain() throws Exception {
+    public void testCreateTransactionChain() {
         try (ClientBackedDataStore clientBackedDataStore = new ClientBackedDataStore(
                 actorContext, UNKNOWN_ID, clientActor)) {
             final DOMStoreTransactionChain txChain = clientBackedDataStore.createTransactionChain();
@@ -87,7 +87,7 @@ public class ClientBackedDataStoreTest {
     }
 
     @Test
-    public void testNewReadOnlyTransaction() throws Exception {
+    public void testNewReadOnlyTransaction() {
         try (ClientBackedDataStore clientBackedDataStore = new ClientBackedDataStore(
                 actorContext, UNKNOWN_ID, clientActor)) {
             final DOMStoreReadTransaction tx = clientBackedDataStore.newReadOnlyTransaction();
@@ -97,7 +97,7 @@ public class ClientBackedDataStoreTest {
     }
 
     @Test
-    public void testNewWriteOnlyTransaction() throws Exception {
+    public void testNewWriteOnlyTransaction() {
         try (ClientBackedDataStore clientBackedDataStore = new ClientBackedDataStore(
                 actorContext, UNKNOWN_ID, clientActor)) {
             final DOMStoreWriteTransaction tx = clientBackedDataStore.newWriteOnlyTransaction();
@@ -107,7 +107,7 @@ public class ClientBackedDataStoreTest {
     }
 
     @Test
-    public void testNewReadWriteTransaction() throws Exception {
+    public void testNewReadWriteTransaction() {
         try (ClientBackedDataStore clientBackedDataStore = new ClientBackedDataStore(
                 actorContext, UNKNOWN_ID, clientActor)) {
             final DOMStoreReadWriteTransaction tx = clientBackedDataStore.newReadWriteTransaction();
index 7d41885ca59459f0daf47eb5424307ad1b209c99..89c0519992b2c7830640ff2ceae7e4d80266b20b 100644 (file)
@@ -32,12 +32,12 @@ public class ClientBackedReadTransactionTest extends ClientBackedTransactionTest
     private ClientSnapshot delegate;
 
     @Override
-    ClientBackedReadTransaction object() throws Exception {
+    ClientBackedReadTransaction object() {
         return object;
     }
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
 
         Mockito.doReturn(CLIENT_ID).when(clientContext).getIdentifier();
index 97adcb35f05addaf28612955d16561de2586c8cd..6ead121c1de0dd03f3c38c5fde28942d991039d8 100644 (file)
@@ -33,12 +33,12 @@ public class ClientBackedReadWriteTransactionTest
     private DOMStoreThreePhaseCommitCohort readyCohort;
 
     @Override
-    ClientBackedReadWriteTransaction object() throws Exception {
+    ClientBackedReadWriteTransaction object() {
         return object;
     }
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
 
         Mockito.doReturn(TRANSACTION_ID).when(delegate).getIdentifier();
index 2238bc4aebc1ab9fe1cafab4a84aa39dfd13f1b9..3bec1835745c576b0881325bfb38657038b41992 100644 (file)
@@ -34,7 +34,7 @@ public class ClientBackedTransactionChainTest {
     private ClientTransaction transaction;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
 
         final FrontendIdentifier frontendId = FrontendIdentifier.create(
@@ -53,25 +53,25 @@ public class ClientBackedTransactionChainTest {
     }
 
     @Test
-    public void testNewReadOnlyTransaction() throws Exception {
+    public void testNewReadOnlyTransaction() {
         Assert.assertNotNull(chain.newReadOnlyTransaction());
         Mockito.verify(history).takeSnapshot();
     }
 
     @Test
-    public void testNewReadWriteTransaction() throws Exception {
+    public void testNewReadWriteTransaction() {
         Assert.assertNotNull(chain.newReadWriteTransaction());
         Mockito.verify(history).createTransaction();
     }
 
     @Test
-    public void testNewWriteOnlyTransaction() throws Exception {
+    public void testNewWriteOnlyTransaction() {
         Assert.assertNotNull(chain.newWriteOnlyTransaction());
         Mockito.verify(history).createTransaction();
     }
 
     @Test
-    public void testClose() throws Exception {
+    public void testClose() {
         chain.newReadOnlyTransaction();
         chain.close();
         Mockito.verify(snapshot).abort();
@@ -79,7 +79,7 @@ public class ClientBackedTransactionChainTest {
     }
 
     @Test
-    public void testSnapshotClosed() throws Exception {
+    public void testSnapshotClosed() {
         chain.snapshotClosed(snapshot);
         // snap is removed, so cannot be aborted
         chain.close();
index bff76b3f5edd7dda6dd06b3afc8d91b94a7d1d3e..39e8d74dcee8f8d42f8576891d94dde019d40afe 100644 (file)
@@ -25,10 +25,10 @@ public abstract class ClientBackedTransactionTest<T extends ClientBackedTransact
     private static LocalHistoryIdentifier HISTORY_ID = new LocalHistoryIdentifier(CLIENT_ID, 0);
     protected static final TransactionIdentifier TRANSACTION_ID = new TransactionIdentifier(HISTORY_ID, 0);
 
-    abstract T object() throws Exception;
+    abstract T object();
 
     @Test
-    public void testClose() throws Exception {
+    public void testClose() {
         final AbstractClientHandle<?> delegate = object().delegate();
         object().close();
         Mockito.verify(delegate).abort();
index 78a5c4b5804b162505b6a060b25a31eb2a9746da..4a6ee3f944b63b869d8e3d136129da799c4b5e43 100644 (file)
@@ -31,7 +31,7 @@ public class ClientBackedWriteTransactionTest extends ClientBackedTransactionTes
     private DOMStoreThreePhaseCommitCohort readyCohort;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
 
         Mockito.doReturn(TRANSACTION_ID).when(delegate).getIdentifier();
@@ -41,30 +41,30 @@ public class ClientBackedWriteTransactionTest extends ClientBackedTransactionTes
     }
 
     @Override
-    ClientBackedWriteTransaction object() throws Exception {
+    ClientBackedWriteTransaction object() {
         return object;
     }
 
     @Test
-    public void testWrite() throws Exception {
+    public void testWrite() {
         object().write(path, data);
         Mockito.verify(delegate).write(path, data);
     }
 
     @Test
-    public void testMerge() throws Exception {
+    public void testMerge() {
         object().merge(path, data);
         Mockito.verify(delegate).merge(path, data);
     }
 
     @Test
-    public void testDelete() throws Exception {
+    public void testDelete() {
         object().delete(path);
         Mockito.verify(delegate).delete(path);
     }
 
     @Test
-    public void testReady() throws Exception {
+    public void testReady() {
         final DOMStoreThreePhaseCommitCohort result = object().ready();
         Assert.assertNotNull(result);
         Mockito.verify(delegate).ready();
index 254b4fc53f3ebe569c6735b4c7d454d75d1e0d0b..028a508b606146a1c52f6f00b94e764a793e12a6 100644 (file)
@@ -107,12 +107,12 @@ public abstract class AbstractClientHandleTest<T extends AbstractClientHandle<Ab
     protected abstract void doHandleOperation(T handle);
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 
     @Test
-    public void testGetIdentifier() throws Exception {
+    public void testGetIdentifier() {
         Assert.assertEquals(TRANSACTION_ID, handle.getIdentifier());
     }
 
@@ -137,7 +137,7 @@ public abstract class AbstractClientHandleTest<T extends AbstractClientHandle<Ab
     }
 
     @Test
-    public void testEnsureClosed() throws Exception {
+    public void testEnsureClosed() {
         doHandleOperation(handle);
         final Collection<AbstractProxyTransaction> transactions = handle.ensureClosed();
         Assert.assertNotNull(transactions);
@@ -145,7 +145,7 @@ public abstract class AbstractClientHandleTest<T extends AbstractClientHandle<Ab
     }
 
     @Test
-    public void testEnsureProxy() throws Exception {
+    public void testEnsureProxy() {
         final Function<Long, AbstractProxyTransaction> function = mock(Function.class);
         final AbstractProxyTransaction expected = mock(AbstractProxyTransaction.class);
         when(function.apply(0L)).thenReturn(expected);
@@ -155,7 +155,7 @@ public abstract class AbstractClientHandleTest<T extends AbstractClientHandle<Ab
     }
 
     @Test
-    public void testParent() throws Exception {
+    public void testParent() {
         Assert.assertEquals(parent, handle.parent());
     }
 
index 45c0dbb9a520a2d8301ec32eb78764ae36245862..c3bef4741ab2d1e9430a931a5ac7a88e164ebf20 100644 (file)
@@ -48,82 +48,82 @@ public abstract class AbstractClientHistoryTest<T extends AbstractClientHistory>
     protected abstract ClientActorContext clientActorContext();
 
     @Test
-    public abstract void testDoCreateSnapshot() throws Exception;
+    public abstract void testDoCreateSnapshot();
 
     @Test
-    public abstract void testDoCreateTransaction() throws Exception;
+    public abstract void testDoCreateTransaction();
 
     @Test
-    public abstract void testCreateHistoryProxy() throws Exception;
+    public abstract void testCreateHistoryProxy();
 
     @Test
-    public abstract void testOnTransactionComplete() throws Exception;
+    public abstract void testOnTransactionComplete();
 
     @Test
-    public abstract void testOnTransactionAbort() throws Exception;
+    public abstract void testOnTransactionAbort();
 
     @Test
-    public abstract void testOnTransactionReady() throws Exception;
+    public abstract void testOnTransactionReady();
 
     @Test
-    public abstract void testOnTransactionReadyDuplicate() throws Exception;
+    public abstract void testOnTransactionReadyDuplicate();
 
     @Test
-    public void testCreateSnapshotProxy() throws Exception {
+    public void testCreateSnapshotProxy() {
         final AbstractProxyTransaction snapshotProxy = object().createSnapshotProxy(TRANSACTION_ID, 0L);
         Assert.assertNotNull(snapshotProxy);
         Assert.assertNotEquals(TRANSACTION_ID, snapshotProxy.getIdentifier());
     }
 
     @Test
-    public void testCreateTransactionProxy() throws Exception {
+    public void testCreateTransactionProxy() {
         AbstractProxyTransaction transactionProxy = object().createTransactionProxy(TRANSACTION_ID, 0L);
         Assert.assertNotNull(transactionProxy);
         Assert.assertNotEquals(TRANSACTION_ID, transactionProxy.getIdentifier());
     }
 
     @Test
-    public void testState() throws Exception {
+    public void testState() {
         Assert.assertEquals(AbstractClientHistory.State.IDLE, object().state());
     }
 
     @Test
-    public void testUpdateState() throws Exception {
+    public void testUpdateState() {
         object().updateState(AbstractClientHistory.State.IDLE, AbstractClientHistory.State.CLOSED);
         Assert.assertEquals(AbstractClientHistory.State.CLOSED, object().state());
     }
 
     @Test
-    public void testDoClose() throws Exception {
+    public void testDoClose() {
         object().createTransactionProxy(TRANSACTION_ID, 0L);
         object().doClose();
         Assert.assertEquals(AbstractClientHistory.State.CLOSED, object().state());
     }
 
     @Test
-    public void testGetIdentifier() throws Exception {
+    public void testGetIdentifier() {
         Assert.assertEquals(HISTORY_ID, object().getIdentifier());
     }
 
     @Test
-    public void testNextTx() throws Exception {
+    public void testNextTx() {
         Assert.assertTrue(object().nextTx() + 1 == object().nextTx());
     }
 
     @Test
-    public void testResolveShardForPath() throws Exception {
+    public void testResolveShardForPath() {
         final Long shardForPath = object().resolveShardForPath(YangInstanceIdentifier.EMPTY);
         Assert.assertEquals(0L, shardForPath.longValue());
     }
 
     @Test
-    public void testLocalAbort() throws Exception {
+    public void testLocalAbort() {
         object().localAbort(new Throwable());
         Assert.assertEquals(AbstractClientHistory.State.CLOSED, object().state());
     }
 
     @Test
-    public void testOnProxyDestroyed() throws Exception {
+    public void testOnProxyDestroyed() {
         final ProxyHistory proxyHistory = Mockito.mock(ProxyHistory.class);
         when(proxyHistory.getIdentifier()).thenReturn(HISTORY_ID);
 
@@ -132,19 +132,19 @@ public abstract class AbstractClientHistoryTest<T extends AbstractClientHistory>
     }
 
     @Test
-    public void testCreateTransaction() throws Exception {
+    public void testCreateTransaction() {
         final ClientTransaction transaction = object().createTransaction();
         Assert.assertNotNull(transaction);
     }
 
     @Test
-    public void testTakeSnapshot() throws Exception {
+    public void testTakeSnapshot() {
         final ClientSnapshot clientSnapshot = object().takeSnapshot();
         Assert.assertEquals(object().getIdentifier(), clientSnapshot.getIdentifier().getHistoryId());
     }
 
     @Test
-    public void testStartReconnect() throws Exception {
+    public void testStartReconnect() {
         // cookie and shard are the same
         final Long cookie = 0L;
         final Long shard = cookie;
@@ -160,7 +160,7 @@ public abstract class AbstractClientHistoryTest<T extends AbstractClientHistory>
     }
 
     @Test
-    public void testStartReconnectMissingOldProxy() throws Exception {
+    public void testStartReconnectMissingOldProxy() {
         // cookie and shard are different
         final Long cookie = 1L;
         final Long shard = 0L;
index 8a5b3f579475ef1c8210fe566e98627802c4210e..b6a11561b0b946ce06e9ceaa2d2cd41f2d65e333 100644 (file)
@@ -50,7 +50,7 @@ public abstract class AbstractDataStoreClientBehaviorTest {
     private AbstractDataStoreClientBehavior behavior;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         system = ActorSystem.apply();
         clientActorProbe = new TestProbe(system, "client");
         actorContextProbe = new TestProbe(system, "actor-context");
@@ -65,22 +65,22 @@ public abstract class AbstractDataStoreClientBehaviorTest {
                                                                       ActorContext context);
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 
     @Test
-    public void testResolveShardForPath() throws Exception {
+    public void testResolveShardForPath() {
         Assert.assertEquals(0L, behavior.resolveShardForPath(YangInstanceIdentifier.EMPTY).longValue());
     }
 
     @Test
-    public void testHaltClient() throws Exception {
+    public void testHaltClient() {
         behavior.haltClient(new RuntimeException());
     }
 
     @Test
-    public void testOnCommand() throws Exception {
+    public void testOnCommand() {
         final TestProbe probe = new TestProbe(system);
         final GetClientRequest request = new GetClientRequest(probe.ref());
         final AbstractDataStoreClientBehavior nextBehavior = behavior.onCommand(request);
@@ -90,31 +90,31 @@ public abstract class AbstractDataStoreClientBehaviorTest {
     }
 
     @Test
-    public void testOnCommandUnhandled() throws Exception {
+    public void testOnCommandUnhandled() {
         final AbstractDataStoreClientBehavior nextBehavior = behavior.onCommand("unhandled");
         Assert.assertSame(behavior, nextBehavior);
     }
 
     @Test
-    public void testCreateLocalHistory() throws Exception {
+    public void testCreateLocalHistory() {
         final ClientLocalHistory history = behavior.createLocalHistory();
         Assert.assertEquals(behavior.getIdentifier(), history.getIdentifier().getClientId());
     }
 
     @Test
-    public void testCreateTransaction() throws Exception {
+    public void testCreateTransaction() {
         final ClientTransaction transaction = behavior.createTransaction();
         Assert.assertEquals(behavior.getIdentifier(), transaction.getIdentifier().getHistoryId().getClientId());
     }
 
     @Test
-    public void testCreateSnapshot() throws Exception {
+    public void testCreateSnapshot() {
         final ClientSnapshot snapshot = behavior.createSnapshot();
         Assert.assertEquals(behavior.getIdentifier(), snapshot.getIdentifier().getHistoryId().getClientId());
     }
 
     @Test
-    public void testClose() throws Exception {
+    public void testClose() {
         behavior.close();
         final InternalCommand<ShardBackendInfo> internalCommand =
                 clientActorProbe.expectMsgClass(InternalCommand.class);
@@ -128,12 +128,12 @@ public abstract class AbstractDataStoreClientBehaviorTest {
     }
 
     @Test
-    public void testGetIdentifier() throws Exception {
+    public void testGetIdentifier() {
         Assert.assertEquals(CLIENT_ID, behavior.getIdentifier());
     }
 
     @Test
-    public void testGetConnection() throws Exception {
+    public void testGetConnection() {
         //set up data tree mock
         final CursorAwareDataTreeModification modification = mock(CursorAwareDataTreeModification.class);
         when(modification.readNode(YangInstanceIdentifier.EMPTY)).thenReturn(Optional.empty());
index 00a4709eb3b7bf37353a7089262e2aed4a2f8db3..a4c653f01e34b5dace3e4a179ea62d4eec032c71 100644 (file)
@@ -97,7 +97,7 @@ public abstract class AbstractProxyTransactionTest<T extends AbstractProxyTransa
     protected T transaction;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
         system = ActorSystem.apply();
         clientContextProbe = new TestProbe(system, "clientContext");
@@ -117,7 +117,7 @@ public abstract class AbstractProxyTransactionTest<T extends AbstractProxyTransa
     protected abstract T createTransaction(ProxyHistory parent, TransactionIdentifier id, DataTreeSnapshot snapshot);
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 
@@ -128,46 +128,46 @@ public abstract class AbstractProxyTransactionTest<T extends AbstractProxyTransa
     public abstract void testRead() throws Exception;
 
     @Test
-    public abstract void testWrite() throws Exception;
+    public abstract void testWrite();
 
     @Test
-    public abstract void testMerge() throws Exception;
+    public abstract void testMerge();
 
     @Test
-    public abstract void testDelete() throws Exception;
+    public abstract void testDelete();
 
     @Test
     public abstract void testDirectCommit() throws Exception;
 
     @Test
-    public abstract void testCanCommit() throws Exception;
+    public abstract void testCanCommit();
 
     @Test
-    public abstract void testPreCommit() throws Exception;
+    public abstract void testPreCommit();
 
     @Test
-    public abstract void testDoCommit() throws Exception;
+    public abstract void testDoCommit();
 
     @Test
-    public abstract void testForwardToRemoteAbort() throws Exception;
+    public abstract void testForwardToRemoteAbort();
 
     @Test
-    public abstract void testForwardToRemoteCommit() throws Exception;
+    public abstract void testForwardToRemoteCommit();
 
     @Test
-    public void testAbortVotingFuture() throws Exception {
+    public void testAbortVotingFuture() {
         testRequestResponse(f -> transaction.abort(f), TransactionAbortRequest.class, TransactionAbortSuccess::new);
     }
 
     @Test
-    public void testForwardToRemotePurge() throws Exception {
+    public void testForwardToRemotePurge() {
         final TestProbe probe = new TestProbe(system);
         final TransactionPurgeRequest request = new TransactionPurgeRequest(TRANSACTION_ID, 0L, probe.ref());
         testForwardToRemote(request, TransactionPurgeRequest.class);
     }
 
     @Test
-    public void testReplayMessages() throws Exception {
+    public void testReplayMessages() {
         final TestProbe probe = new TestProbe(system);
         final List<ConnectionEntry> entries = new ArrayList<>();
         final Consumer<Response<?, ?>> callback = createCallbackMock();
@@ -230,7 +230,7 @@ public abstract class AbstractProxyTransactionTest<T extends AbstractProxyTransa
     @SuppressWarnings("checkstyle:hiddenField")
     protected <R extends TransactionRequest<R>> void testRequestResponse(final Consumer<VotingFuture<Void>> consumer,
             final Class<R> expectedRequest,
-            final BiFunction<TransactionIdentifier, Long, TransactionSuccess<?>> replySupplier) throws Exception {
+            final BiFunction<TransactionIdentifier, Long, TransactionSuccess<?>> replySupplier) {
         final TransactionTester<T> tester = getTester();
         final VotingFuture<Void> future = mock(VotingFuture.class);
         transaction.seal();
@@ -240,7 +240,7 @@ public abstract class AbstractProxyTransactionTest<T extends AbstractProxyTransa
         verify(future).voteYes();
     }
 
-    protected <R extends TransactionRequest<R>> R testHandleForwardedRemoteRequest(final R request) throws Exception {
+    protected <R extends TransactionRequest<R>> R testHandleForwardedRemoteRequest(final R request) {
         transaction.handleReplayedRemoteRequest(request, createCallbackMock(), Ticker.systemTicker().read());
         final RequestEnvelope envelope = backendProbe.expectMsgClass(RequestEnvelope.class);
         final R received = (R) envelope.getMessage();
index 963b3664974d37c06cb7c7b8d7a3608a24f734f4..bc8283c4768b7b8874b491d053962a6debf7c6e1 100644 (file)
@@ -36,7 +36,7 @@ public class ClientLocalHistoryTest extends AbstractClientHistoryTest<ClientLoca
     private ClientTransaction transaction;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
 
         system = ActorSystem.apply();
@@ -52,7 +52,7 @@ public class ClientLocalHistoryTest extends AbstractClientHistoryTest<ClientLoca
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 
@@ -67,28 +67,28 @@ public class ClientLocalHistoryTest extends AbstractClientHistoryTest<ClientLoca
     }
 
     @Test
-    public void testClose() throws Exception {
+    public void testClose() {
         object().close();
         Assert.assertEquals(AbstractClientHistory.State.CLOSED, object().state());
     }
 
     @Override
     @Test
-    public void testDoCreateTransaction() throws Exception {
+    public void testDoCreateTransaction() {
         final ClientTransaction clientTransaction = object().doCreateTransaction();
         Assert.assertEquals(object().getIdentifier(), clientTransaction.getIdentifier().getHistoryId());
     }
 
     @Override
     @Test
-    public void testOnTransactionAbort() throws Exception {
+    public void testOnTransactionAbort() {
         final ClientSnapshot clientSnapshot = object().doCreateSnapshot();
         Assert.assertTrue(clientSnapshot.abort());
     }
 
     @Override
     @Test
-    public void testCreateHistoryProxy() throws Exception {
+    public void testCreateHistoryProxy() {
         final AbstractClientConnection<ShardBackendInfo> clientConnection = behavior.getConnection(0L);
         final ProxyHistory historyProxy = object().createHistoryProxy(HISTORY_ID, clientConnection);
         Assert.assertEquals(object().getIdentifier(), historyProxy.getIdentifier());
@@ -96,7 +96,7 @@ public class ClientLocalHistoryTest extends AbstractClientHistoryTest<ClientLoca
 
     @Override
     @Test
-    public void testDoCreateSnapshot() throws Exception {
+    public void testDoCreateSnapshot() {
         final ClientSnapshot clientSnapshot = object().doCreateSnapshot();
         Assert.assertEquals(new TransactionIdentifier(object().getIdentifier(), object().nextTx()).getHistoryId(),
                 clientSnapshot.getIdentifier().getHistoryId());
@@ -104,7 +104,7 @@ public class ClientLocalHistoryTest extends AbstractClientHistoryTest<ClientLoca
 
     @Override
     @Test
-    public void testOnTransactionComplete() throws Exception {
+    public void testOnTransactionComplete() {
         final ClientTransaction tx = object().createTransaction();
 
         // make transaction ready
@@ -120,7 +120,7 @@ public class ClientLocalHistoryTest extends AbstractClientHistoryTest<ClientLoca
 
     @Override
     @Test
-    public void testOnTransactionReady() throws Exception {
+    public void testOnTransactionReady() {
         final AbstractTransactionCommitCohort result = object().onTransactionReady(
                 object().createTransaction(), cohort);
         Assert.assertEquals(result, cohort);
@@ -128,14 +128,14 @@ public class ClientLocalHistoryTest extends AbstractClientHistoryTest<ClientLoca
 
     @Override
     @Test(expected = IllegalStateException.class)
-    public void testOnTransactionReadyDuplicate() throws Exception {
+    public void testOnTransactionReadyDuplicate() {
         final ClientTransaction tx = object().createTransaction();
         object().onTransactionReady(tx, cohort);
         object().onTransactionReady(tx, cohort);
     }
 
     @Test
-    public void testOnTransactionReadyAndComplete() throws Exception {
+    public void testOnTransactionReadyAndComplete() {
         object().updateState(AbstractClientHistory.State.IDLE, AbstractClientHistory.State.TX_OPEN);
         final AbstractTransactionCommitCohort transactionCommitCohort =
                 object().onTransactionReady(transaction, cohort);
@@ -143,7 +143,7 @@ public class ClientLocalHistoryTest extends AbstractClientHistoryTest<ClientLoca
     }
 
     @Test
-    public void testOnTransactionReadyAndCompleteStateClosed() throws Exception {
+    public void testOnTransactionReadyAndCompleteStateClosed() {
         object().updateState(AbstractClientHistory.State.IDLE, AbstractClientHistory.State.CLOSED);
         final AbstractTransactionCommitCohort transactionCommitCohort =
                 object().onTransactionReady(transaction, cohort);
@@ -151,7 +151,7 @@ public class ClientLocalHistoryTest extends AbstractClientHistoryTest<ClientLoca
     }
 
     @Test(expected = IllegalStateException.class)
-    public void testOnTransactionReadyAndCompleteIdleFail() throws Exception {
+    public void testOnTransactionReadyAndCompleteIdleFail() {
         object().onTransactionReady(transaction, cohort);
     }
 }
index b30986ee3d330009a46ee809449ceabdf57fde01..481c7d753189961de4d86575ca70fd5aa92355d7 100644 (file)
@@ -60,7 +60,7 @@ public class ClientTransactionCommitCohortTest {
     private ClientTransactionCommitCohort cohort;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
         system = ActorSystem.apply();
         final TestProbe clientContextProbe = new TestProbe(system, "clientContext");
@@ -78,7 +78,7 @@ public class ClientTransactionCommitCohortTest {
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 
index 14bc0def653b71111dc10a7311195d706e3ca2f0..2e7f8f3b843247107ca15df40a76ecd48d481143 100644 (file)
@@ -31,13 +31,13 @@ public class ClientTransactionCursorTest {
     private ClientTransactionCursor cursor;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
         cursor = new ClientTransactionCursor(transaction);
     }
 
     @Test
-    public void testEnterOneNode() throws Exception {
+    public void testEnterOneNode() {
         cursor.enter(YangInstanceIdentifier.NodeIdentifier.create(NODE_1));
         cursor.delete(YangInstanceIdentifier.NodeIdentifier.create(NODE_2));
         final YangInstanceIdentifier expected = createId(NODE_1, NODE_2);
@@ -45,7 +45,7 @@ public class ClientTransactionCursorTest {
     }
 
     @Test
-    public void testEnterNodeIterables() throws Exception {
+    public void testEnterNodeIterables() {
         final Iterable<YangInstanceIdentifier.PathArgument> collect = toPathArg(NODE_1, NODE_2);
         cursor.enter(collect);
         cursor.delete(YangInstanceIdentifier.NodeIdentifier.create(NODE_3));
@@ -54,7 +54,7 @@ public class ClientTransactionCursorTest {
     }
 
     @Test
-    public void testEnterNodeVarargs() throws Exception {
+    public void testEnterNodeVarargs() {
         cursor.enter(YangInstanceIdentifier.NodeIdentifier.create(NODE_1),
                 YangInstanceIdentifier.NodeIdentifier.create(NODE_2));
         cursor.delete(YangInstanceIdentifier.NodeIdentifier.create(NODE_3));
@@ -63,7 +63,7 @@ public class ClientTransactionCursorTest {
     }
 
     @Test
-    public void testExitOneLevel() throws Exception {
+    public void testExitOneLevel() {
         cursor.enter(toPathArg(NODE_1, NODE_2));
         cursor.exit();
         cursor.delete(YangInstanceIdentifier.NodeIdentifier.create(NODE_2));
@@ -72,7 +72,7 @@ public class ClientTransactionCursorTest {
     }
 
     @Test
-    public void testExitTwoLevels() throws Exception {
+    public void testExitTwoLevels() {
         cursor.enter(toPathArg(NODE_1, NODE_2, NODE_3));
         cursor.exit(2);
         cursor.delete(YangInstanceIdentifier.NodeIdentifier.create(NODE_2));
@@ -81,20 +81,20 @@ public class ClientTransactionCursorTest {
     }
 
     @Test
-    public void testClose() throws Exception {
+    public void testClose() {
         cursor.close();
         verify(transaction).closeCursor(cursor);
     }
 
     @Test
-    public void testDelete() throws Exception {
+    public void testDelete() {
         cursor.delete(YangInstanceIdentifier.NodeIdentifier.create(NODE_1));
         final YangInstanceIdentifier expected = createId(NODE_1);
         verify(transaction).delete(expected);
     }
 
     @Test
-    public void testMerge() throws Exception {
+    public void testMerge() {
         final YangInstanceIdentifier.NodeIdentifier path = YangInstanceIdentifier.NodeIdentifier.create(NODE_1);
         final ContainerNode data = createData(path.getNodeType());
         cursor.merge(path, data);
@@ -103,7 +103,7 @@ public class ClientTransactionCursorTest {
     }
 
     @Test
-    public void testWrite() throws Exception {
+    public void testWrite() {
         final YangInstanceIdentifier.NodeIdentifier path = YangInstanceIdentifier.NodeIdentifier.create(NODE_1);
         final ContainerNode data = createData(path.getNodeType());
         cursor.write(path, data);
index 9dd5d7b7aaa0f74b5ac8c2defa8239895f3db35a..3fe913bafb5c334c802284c3666961c83345279a 100644 (file)
@@ -62,7 +62,7 @@ public class ClientTransactionTest extends AbstractClientHandleTest<ClientTransa
     }
 
     @Test
-    public void testOpenCloseCursor() throws Exception {
+    public void testOpenCloseCursor() {
         final DOMDataTreeWriteCursor cursor = getHandle().openCursor();
         getHandle().closeCursor(cursor);
         getHandle().openCursor().delete(PATH.getLastPathArgument());
@@ -92,19 +92,19 @@ public class ClientTransactionTest extends AbstractClientHandleTest<ClientTransa
     }
 
     @Test
-    public void testDelete() throws Exception {
+    public void testDelete() {
         getHandle().delete(PATH);
         verify(modification).delete(PATH);
     }
 
     @Test
-    public void testMerge() throws Exception {
+    public void testMerge() {
         getHandle().merge(PATH, DATA);
         verify(modification).merge(PATH, DATA);
     }
 
     @Test
-    public void testWrite() throws Exception {
+    public void testWrite() {
         getHandle().write(PATH, DATA);
         verify(modification).write(PATH, DATA);
     }
index acde5f543589e57272167058859a1fa11acae5e8..41f48c963c3ef8a5e4b5806650da029b5707ee88 100644 (file)
@@ -45,7 +45,7 @@ public class DirectTransactionCommitCohortTest {
     private DirectTransactionCommitCohort cohort;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
         system = ActorSystem.apply();
         final TestProbe clientContextProbe = new TestProbe(system, "clientContext");
@@ -58,7 +58,7 @@ public class DirectTransactionCommitCohortTest {
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 
index 024f88fa4f6d8a5a732ddf71c7dfeed2edba8bf5..0735b53c6cca1ff8e60d6c3b3b822a5ac5e92b0d 100644 (file)
@@ -26,7 +26,7 @@ public class EmptyTransactionCommitCohortTest {
     private EmptyTransactionCommitCohort cohort;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
         cohort = new EmptyTransactionCommitCohort(history, TRANSACTION_ID);
     }
index a4405de9d370d397ce8b31cc99cd1dce47c7ba5e..860bb3cb3438432bdb69c4285f88fa62986d3e7c 100644 (file)
@@ -56,7 +56,7 @@ public abstract class LocalProxyTransactionTest<T extends LocalProxyTransaction>
     }
 
     @Test
-    public void testAbort() throws Exception {
+    public void testAbort() {
         transaction.abort();
         getTester().expectTransactionRequest(AbortLocalTransactionRequest.class);
     }
@@ -70,7 +70,7 @@ public abstract class LocalProxyTransactionTest<T extends LocalProxyTransaction>
     }
 
     @Test
-    public void testHandleForwardedRemoteReadRequest() throws Exception {
+    public void testHandleForwardedRemoteReadRequest() {
         final TestProbe probe = createProbe();
         final ReadTransactionRequest request =
                 new ReadTransactionRequest(TRANSACTION_ID, 0L, probe.ref(), PATH_1, true);
@@ -88,7 +88,7 @@ public abstract class LocalProxyTransactionTest<T extends LocalProxyTransaction>
     }
 
     @Test
-    public void testHandleForwardedRemoteExistsRequest() throws Exception {
+    public void testHandleForwardedRemoteExistsRequest() {
         final TestProbe probe = createProbe();
         final ExistsTransactionRequest request =
                 new ExistsTransactionRequest(TRANSACTION_ID, 0L, probe.ref(), PATH_1, true);
@@ -105,7 +105,7 @@ public abstract class LocalProxyTransactionTest<T extends LocalProxyTransaction>
     }
 
     @Test
-    public void testHandleForwardedRemotePurgeRequest() throws Exception {
+    public void testHandleForwardedRemotePurgeRequest() {
         final TestProbe probe = createProbe();
         final TransactionPurgeRequest request =
                 new TransactionPurgeRequest(TRANSACTION_ID, 0L, probe.ref());
@@ -114,7 +114,7 @@ public abstract class LocalProxyTransactionTest<T extends LocalProxyTransaction>
 
     @Override
     @Test
-    public void testForwardToRemoteAbort() throws Exception {
+    public void testForwardToRemoteAbort() {
         final TestProbe probe = createProbe();
         final AbortLocalTransactionRequest request = new AbortLocalTransactionRequest(TRANSACTION_ID, probe.ref());
         final ModifyTransactionRequest modifyRequest = testForwardToRemote(request, ModifyTransactionRequest.class);
@@ -124,7 +124,7 @@ public abstract class LocalProxyTransactionTest<T extends LocalProxyTransaction>
 
     @Override
     @Test
-    public void testForwardToRemoteCommit() throws Exception {
+    public void testForwardToRemoteCommit() {
         final TestProbe probe = createProbe();
         final CursorAwareDataTreeModification modification = mock(CursorAwareDataTreeModification.class);
         final CommitLocalTransactionRequest request =
@@ -138,14 +138,14 @@ public abstract class LocalProxyTransactionTest<T extends LocalProxyTransaction>
     }
 
     @Test
-    public void testForwardToLocalAbort() throws Exception {
+    public void testForwardToLocalAbort() {
         final TestProbe probe = createProbe();
         final AbortLocalTransactionRequest request = new AbortLocalTransactionRequest(TRANSACTION_ID, probe.ref());
         testForwardToLocal(request, AbortLocalTransactionRequest.class);
     }
 
     @Test
-    public void testForwardToLocalPurge() throws Exception {
+    public void testForwardToLocalPurge() {
         final TestProbe probe = createProbe();
         final TransactionPurgeRequest request = new TransactionPurgeRequest(TRANSACTION_ID, 0L, probe.ref());
         testForwardToLocal(request, TransactionPurgeRequest.class);
index 1fd82fbc021f2bf96130fddb0e93a96cb835d701..7a4fb742038a5ed6d15305b5437f1fe6565d1a20 100644 (file)
@@ -49,25 +49,25 @@ public class LocalReadOnlyProxyTransactionTest extends LocalProxyTransactionTest
 
     @Override
     @Test(expected = UnsupportedOperationException.class)
-    public void testDirectCommit() throws Exception {
+    public void testDirectCommit() {
         transaction.directCommit();
     }
 
     @Override
     @Test(expected = UnsupportedOperationException.class)
-    public void testCanCommit() throws Exception {
+    public void testCanCommit() {
         transaction.canCommit(new VotingFuture<>(new Object(), 1));
     }
 
     @Override
     @Test(expected = UnsupportedOperationException.class)
-    public void testPreCommit() throws Exception {
+    public void testPreCommit() {
         transaction.preCommit(new VotingFuture<>(new Object(), 1));
     }
 
     @Override
     @Test(expected = UnsupportedOperationException.class)
-    public void testDoCommit() throws Exception {
+    public void testDoCommit() {
         transaction.doCommit(new VotingFuture<>(new Object(), 1));
     }
 
@@ -110,7 +110,7 @@ public class LocalReadOnlyProxyTransactionTest extends LocalProxyTransactionTest
     }
 
     @Test
-    public void testApplyModifyTransactionRequest() throws Exception {
+    public void testApplyModifyTransactionRequest() {
         final TestProbe probe = createProbe();
         final ModifyTransactionRequestBuilder builder =
                 new ModifyTransactionRequestBuilder(TRANSACTION_ID, probe.ref());
index 2ecbc9baedcf89d487cbf041729f7b4bf87a3d16..cadb5d8014644c80ad62ca48f51341bd3ab661b9 100644 (file)
@@ -59,18 +59,18 @@ public class LocalReadWriteProxyTransactionTest extends LocalProxyTransactionTes
     }
 
     @Test
-    public void testIsSnapshotOnly() throws Exception {
+    public void testIsSnapshotOnly() {
         Assert.assertFalse(transaction.isSnapshotOnly());
     }
 
     @Test
-    public void testReadOnlyView() throws Exception {
+    public void testReadOnlyView() {
         Assert.assertEquals(modification, transaction.readOnlyView());
     }
 
     @Test
     @Override
-    public void testDelete() throws Exception {
+    public void testDelete() {
         transaction.delete(PATH_1);
         verify(modification).delete(PATH_1);
     }
@@ -88,40 +88,40 @@ public class LocalReadWriteProxyTransactionTest extends LocalProxyTransactionTes
 
     @Test
     @Override
-    public void testCanCommit() throws Exception {
+    public void testCanCommit() {
         testRequestResponse(transaction::canCommit, CommitLocalTransactionRequest.class,
                 TransactionCanCommitSuccess::new);
     }
 
     @Test
     @Override
-    public void testPreCommit() throws Exception {
+    public void testPreCommit() {
         testRequestResponse(transaction::preCommit, TransactionPreCommitRequest.class,
                 TransactionPreCommitSuccess::new);
     }
 
     @Test
     @Override
-    public void testDoCommit() throws Exception {
+    public void testDoCommit() {
         testRequestResponse(transaction::doCommit, TransactionDoCommitRequest.class, TransactionCommitSuccess::new);
     }
 
     @Test
     @Override
-    public void testMerge() throws Exception {
+    public void testMerge() {
         transaction.merge(PATH_1, DATA_1);
         verify(modification).merge(PATH_1, DATA_1);
     }
 
     @Test
     @Override
-    public void testWrite() throws Exception {
+    public void testWrite() {
         transaction.write(PATH_1, DATA_1);
         verify(modification).write(PATH_1, DATA_1);
     }
 
     @Test
-    public void testCommitRequest() throws Exception {
+    public void testCommitRequest() {
         transaction.doWrite(PATH_1, DATA_1);
         final boolean coordinated = true;
         final CommitLocalTransactionRequest request = transaction.commitRequest(coordinated);
@@ -145,7 +145,7 @@ public class LocalReadWriteProxyTransactionTest extends LocalProxyTransactionTes
     }
 
     @Test
-    public void testFlushState() throws Exception {
+    public void testFlushState() {
         final TransactionTester<RemoteProxyTransaction> transactionTester = createRemoteProxyTransactionTester();
         final RemoteProxyTransaction successor = transactionTester.getTransaction();
         doAnswer(LocalProxyTransactionTest::applyToCursorAnswer).when(modification).applyToCursor(any());
@@ -161,17 +161,17 @@ public class LocalReadWriteProxyTransactionTest extends LocalProxyTransactionTes
     }
 
     @Test
-    public void testApplyModifyTransactionRequestCoordinated() throws Exception {
+    public void testApplyModifyTransactionRequestCoordinated() {
         applyModifyTransactionRequest(true);
     }
 
     @Test
-    public void testApplyModifyTransactionRequestSimple() throws Exception {
+    public void testApplyModifyTransactionRequestSimple() {
         applyModifyTransactionRequest(false);
     }
 
     @Test
-    public void testApplyModifyTransactionRequestAbort() throws Exception {
+    public void testApplyModifyTransactionRequestAbort() {
         final TestProbe probe = createProbe();
         final ModifyTransactionRequestBuilder builder =
                 new ModifyTransactionRequestBuilder(TRANSACTION_ID, probe.ref());
@@ -184,7 +184,7 @@ public class LocalReadWriteProxyTransactionTest extends LocalProxyTransactionTes
     }
 
     @Test
-    public void testHandleForwardedRemotePreCommitRequest() throws Exception {
+    public void testHandleForwardedRemotePreCommitRequest() {
         final TestProbe probe = createProbe();
         final TransactionPreCommitRequest request =
                 new TransactionPreCommitRequest(TRANSACTION_ID, 0L, probe.ref());
@@ -192,7 +192,7 @@ public class LocalReadWriteProxyTransactionTest extends LocalProxyTransactionTes
     }
 
     @Test
-    public void testHandleForwardedRemoteDoCommitRequest() throws Exception {
+    public void testHandleForwardedRemoteDoCommitRequest() {
         final TestProbe probe = createProbe();
         final TransactionDoCommitRequest request =
                 new TransactionDoCommitRequest(TRANSACTION_ID, 0L, probe.ref());
@@ -200,7 +200,7 @@ public class LocalReadWriteProxyTransactionTest extends LocalProxyTransactionTes
     }
 
     @Test
-    public void testHandleForwardedRemoteAbortRequest() throws Exception {
+    public void testHandleForwardedRemoteAbortRequest() {
         final TestProbe probe = createProbe();
         final TransactionAbortRequest request =
                 new TransactionAbortRequest(TRANSACTION_ID, 0L, probe.ref());
@@ -208,7 +208,7 @@ public class LocalReadWriteProxyTransactionTest extends LocalProxyTransactionTes
     }
 
     @Test
-    public void testForwardToLocalCommit() throws Exception {
+    public void testForwardToLocalCommit() {
         final TestProbe probe = createProbe();
         final DataTreeModification mod = mock(DataTreeModification.class);
         final TransactionRequest<?> request =
index c2464e7b8b8f8f510932ca82c57fa58ca84a434e..bedd4a9283ec4d4710559e7f971418021f2964b7 100644 (file)
@@ -60,7 +60,7 @@ public class ModuleShardBackendResolverTest {
     private DataTree dataTree;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
         system = ActorSystem.apply();
         contextProbe = new TestProbe(system, "context");
@@ -73,19 +73,19 @@ public class ModuleShardBackendResolverTest {
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 
     @Test
-    public void testResolveShardForPathNonNullCookie() throws Exception {
+    public void testResolveShardForPathNonNullCookie() {
         when(shardStrategy.findShard(YangInstanceIdentifier.EMPTY)).thenReturn("default");
         final Long cookie = moduleShardBackendResolver.resolveShardForPath(YangInstanceIdentifier.EMPTY);
         Assert.assertEquals(0L, cookie.longValue());
     }
 
     @Test
-    public void testResolveShardForPathNullCookie() throws Exception {
+    public void testResolveShardForPathNullCookie() {
         when(shardStrategy.findShard(YangInstanceIdentifier.EMPTY)).thenReturn("foo");
         final Long cookie = moduleShardBackendResolver.resolveShardForPath(YangInstanceIdentifier.EMPTY);
         Assert.assertEquals(1L, cookie.longValue());
index e159cf02d975cff85a7dc28f5358109242388914..2731b7d315700a6af8d032161325ce77e56ea755 100644 (file)
@@ -73,21 +73,21 @@ public class RemoteProxyTransactionTest extends AbstractProxyTransactionTest<Rem
 
     @Override
     @Test
-    public void testWrite() throws Exception {
+    public void testWrite() {
         final YangInstanceIdentifier path = PATH_1;
         testModification(() -> transaction.write(path, DATA_1), TransactionWrite.class, path);
     }
 
     @Override
     @Test
-    public void testMerge() throws Exception {
+    public void testMerge() {
         final YangInstanceIdentifier path = PATH_2;
         testModification(() -> transaction.merge(path, DATA_2), TransactionMerge.class, path);
     }
 
     @Override
     @Test
-    public void testDelete() throws Exception {
+    public void testDelete() {
         final YangInstanceIdentifier path = PATH_3;
         testModification(() -> transaction.delete(path), TransactionDelete.class, path);
     }
@@ -107,27 +107,27 @@ public class RemoteProxyTransactionTest extends AbstractProxyTransactionTest<Rem
 
     @Override
     @Test
-    public void testCanCommit() throws Exception {
+    public void testCanCommit() {
         testRequestResponse(transaction::canCommit, ModifyTransactionRequest.class,
                 TransactionCanCommitSuccess::new);
     }
 
     @Override
     @Test
-    public void testPreCommit() throws Exception {
+    public void testPreCommit() {
         testRequestResponse(transaction::preCommit, TransactionPreCommitRequest.class,
                 TransactionPreCommitSuccess::new);
     }
 
     @Override
     @Test
-    public void testDoCommit() throws Exception {
+    public void testDoCommit() {
         testRequestResponse(transaction::doCommit, TransactionDoCommitRequest.class, TransactionCommitSuccess::new);
     }
 
     @Override
     @Test
-    public void testForwardToRemoteAbort() throws Exception {
+    public void testForwardToRemoteAbort() {
         final TestProbe probe = createProbe();
         final TransactionAbortRequest request = new TransactionAbortRequest(TRANSACTION_ID, 0L, probe.ref());
         testForwardToRemote(request, TransactionAbortRequest.class);
@@ -135,14 +135,14 @@ public class RemoteProxyTransactionTest extends AbstractProxyTransactionTest<Rem
     }
 
     @Override
-    public void testForwardToRemoteCommit() throws Exception {
+    public void testForwardToRemoteCommit() {
         final TestProbe probe = createProbe();
         final TransactionAbortRequest request = new TransactionAbortRequest(TRANSACTION_ID, 0L, probe.ref());
         testForwardToRemote(request, TransactionAbortRequest.class);
     }
 
     @Test
-    public void testForwardToRemoteModifyCommitSimple() throws Exception {
+    public void testForwardToRemoteModifyCommitSimple() {
         final TestProbe probe = createProbe();
         final ModifyTransactionRequestBuilder builder =
                 new ModifyTransactionRequestBuilder(TRANSACTION_ID, probe.ref());
@@ -156,7 +156,7 @@ public class RemoteProxyTransactionTest extends AbstractProxyTransactionTest<Rem
     }
 
     @Test
-    public void testForwardToRemoteModifyCommit3Phase() throws Exception {
+    public void testForwardToRemoteModifyCommit3Phase() {
         final TestProbe probe = createProbe();
         final ModifyTransactionRequestBuilder builder =
                 new ModifyTransactionRequestBuilder(TRANSACTION_ID, probe.ref());
@@ -170,7 +170,7 @@ public class RemoteProxyTransactionTest extends AbstractProxyTransactionTest<Rem
     }
 
     @Test
-    public void testForwardToRemoteModifyAbort() throws Exception {
+    public void testForwardToRemoteModifyAbort() {
         final TestProbe probe = createProbe();
         final ModifyTransactionRequestBuilder builder =
                 new ModifyTransactionRequestBuilder(TRANSACTION_ID, probe.ref());
@@ -184,7 +184,7 @@ public class RemoteProxyTransactionTest extends AbstractProxyTransactionTest<Rem
     }
 
     @Test
-    public void testForwardToRemoteModifyRead() throws Exception {
+    public void testForwardToRemoteModifyRead() {
         final TestProbe probe = createProbe();
         final ReadTransactionRequest request =
                 new ReadTransactionRequest(TRANSACTION_ID, 0L, probe.ref(), PATH_1, false);
@@ -194,7 +194,7 @@ public class RemoteProxyTransactionTest extends AbstractProxyTransactionTest<Rem
     }
 
     @Test
-    public void testForwardToRemoteModifyExists() throws Exception {
+    public void testForwardToRemoteModifyExists() {
         final TestProbe probe = createProbe();
         final ExistsTransactionRequest request =
                 new ExistsTransactionRequest(TRANSACTION_ID, 0L, probe.ref(), PATH_1, false);
@@ -204,7 +204,7 @@ public class RemoteProxyTransactionTest extends AbstractProxyTransactionTest<Rem
     }
 
     @Test
-    public void testForwardToRemoteModifyPreCommit() throws Exception {
+    public void testForwardToRemoteModifyPreCommit() {
         final TestProbe probe = createProbe();
         final TransactionPreCommitRequest request =
                 new TransactionPreCommitRequest(TRANSACTION_ID, 0L, probe.ref());
@@ -213,7 +213,7 @@ public class RemoteProxyTransactionTest extends AbstractProxyTransactionTest<Rem
     }
 
     @Test
-    public void testForwardToRemoteModifyDoCommit() throws Exception {
+    public void testForwardToRemoteModifyDoCommit() {
         final TestProbe probe = createProbe();
         final TransactionDoCommitRequest request =
                 new TransactionDoCommitRequest(TRANSACTION_ID, 0L, probe.ref());
index 329862ac58a1b40f7b20b719875e0c8ca2341e4a..aaa131566b1812f6d5d30c656bc1c054f3c17418 100644 (file)
@@ -34,7 +34,7 @@ public class SingleClientHistoryTest extends AbstractClientHistoryTest<SingleCli
     private AbstractTransactionCommitCohort cohort;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
 
         system = ActorSystem.apply();
@@ -50,7 +50,7 @@ public class SingleClientHistoryTest extends AbstractClientHistoryTest<SingleCli
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 
@@ -66,14 +66,14 @@ public class SingleClientHistoryTest extends AbstractClientHistoryTest<SingleCli
 
     @Override
     @Test
-    public void testDoCreateTransaction() throws Exception {
+    public void testDoCreateTransaction() {
         final ClientTransaction clientTransaction = object().doCreateTransaction();
         Assert.assertEquals(object().getIdentifier(), clientTransaction.getIdentifier().getHistoryId());
     }
 
     @Override
     @Test
-    public void testCreateHistoryProxy() throws Exception {
+    public void testCreateHistoryProxy() {
         final AbstractClientConnection<ShardBackendInfo> clientConnection = behavior.getConnection(0L);
         final ProxyHistory historyProxy = object().createHistoryProxy(HISTORY_ID, clientConnection);
         Assert.assertEquals(object().getIdentifier(), historyProxy.getIdentifier());
@@ -81,7 +81,7 @@ public class SingleClientHistoryTest extends AbstractClientHistoryTest<SingleCli
 
     @Override
     @Test
-    public void testDoCreateSnapshot() throws Exception {
+    public void testDoCreateSnapshot() {
         final ClientSnapshot clientSnapshot = object().doCreateSnapshot();
         Assert.assertEquals(new TransactionIdentifier(object().getIdentifier(), object().nextTx()).getHistoryId(),
                 clientSnapshot.getIdentifier().getHistoryId());
@@ -89,7 +89,7 @@ public class SingleClientHistoryTest extends AbstractClientHistoryTest<SingleCli
 
     @Override
     @Test
-    public void testOnTransactionComplete() throws Exception {
+    public void testOnTransactionComplete() {
         final ClientTransaction transaction = object().createTransaction();
         // make transaction ready
         object().onTransactionReady(transaction, cohort);
@@ -102,14 +102,14 @@ public class SingleClientHistoryTest extends AbstractClientHistoryTest<SingleCli
 
     @Override
     @Test
-    public void testOnTransactionAbort() throws Exception {
+    public void testOnTransactionAbort() {
         final ClientSnapshot clientSnapshot = object().doCreateSnapshot();
         Assert.assertTrue(clientSnapshot.abort());
     }
 
     @Override
     @Test
-    public void testOnTransactionReady() throws Exception {
+    public void testOnTransactionReady() {
         final AbstractTransactionCommitCohort result = object().onTransactionReady(
                 object().createTransaction(), cohort);
         Assert.assertEquals(result, cohort);
@@ -117,7 +117,7 @@ public class SingleClientHistoryTest extends AbstractClientHistoryTest<SingleCli
 
     @Override
     @Test(expected = IllegalStateException.class)
-    public void testOnTransactionReadyDuplicate() throws Exception {
+    public void testOnTransactionReadyDuplicate() {
         final ClientTransaction transaction = object().createTransaction();
         object().onTransactionReady(transaction, cohort);
         object().onTransactionReady(transaction, cohort);
index c2c55a4a73c678a2341aeb15d3f6a01603844fd0..cdc1f78218c15bbfa9b0680cff58e668f62e61db 100644 (file)
@@ -29,14 +29,14 @@ public class VotingFutureTest {
     private VotingFuture<Object> future;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         result = new Object();
         future = new VotingFuture<>(result, 3);
         executor = Executors.newScheduledThreadPool(1);
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         executor.shutdownNow();
     }
 
index 7c2255e962e522d94382bfd4b35fe8383061b4fd..61abb2cba68926b8d51ae424b89c4462433c22fb 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.controller.cluster.datastore;
 
 import akka.actor.ActorSystem;
 import akka.testkit.javadsl.TestKit;
-import java.io.IOException;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 
@@ -18,13 +17,13 @@ public abstract class AbstractActorTest extends AbstractTest {
     private static ActorSystem system;
 
     @BeforeClass
-    public static void setUpClass() throws IOException {
+    public static void setUpClass() {
         System.setProperty("shard.persistent", "false");
         system = ActorSystem.create("test");
     }
 
     @AfterClass
-    public static void tearDownClass() throws IOException {
+    public static void tearDownClass() {
         TestKit.shutdownActorSystem(system);
         system = null;
     }
index a9f7593f153e5246b02630c506908df3013fae0d..1ed067a47e5d34117c2091912b7265e17c80da62 100644 (file)
@@ -11,7 +11,6 @@ package org.opendaylight.controller.cluster.datastore;
 import akka.actor.ActorSystem;
 import akka.testkit.javadsl.TestKit;
 import com.typesafe.config.ConfigFactory;
-import java.io.IOException;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 
@@ -19,13 +18,13 @@ public abstract class AbstractClusterRefActorTest extends AbstractTest {
     private static ActorSystem system;
 
     @BeforeClass
-    public static void setUpClass() throws IOException {
+    public static void setUpClass() {
         System.setProperty("shard.persistent", "false");
         system = ActorSystem.create("test", ConfigFactory.load().getConfig("test-config"));
     }
 
     @AfterClass
-    public static void tearDownClass() throws IOException {
+    public static void tearDownClass() {
         TestKit.shutdownActorSystem(system, Boolean.TRUE);
         system = null;
     }
index f6f45b0b2ff682da91fdaa0e29f065592ce733b1..283e6867bff94997861cd385db9b10d3a9eb78ba 100644 (file)
@@ -59,7 +59,7 @@ public class AbstractShardManagerTest extends AbstractClusterRefActorTest {
     }
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         initMocks(this);
 
         InMemoryJournal.clear();
index b289b6b160c517886f0f87d671bb573483fb8105..45d625768940780624e476643c1f3faed141b609 100644 (file)
@@ -289,7 +289,7 @@ public abstract class AbstractShardTest extends AbstractActorTest {
     }
 
     public static NormalizedNode<?,?> readStore(final TestActorRef<? extends Shard> shard,
-            final YangInstanceIdentifier id) throws ExecutionException, InterruptedException {
+            final YangInstanceIdentifier id) {
         return shard.underlyingActor().getDataStore().readNode(id).orNull();
     }
 
@@ -386,7 +386,7 @@ public abstract class AbstractShardTest extends AbstractActorTest {
     }
 
     @SuppressWarnings("unchecked")
-    static void verifyOuterListEntry(final TestActorRef<Shard> shard, final Object expIDValue) throws Exception {
+    static void verifyOuterListEntry(final TestActorRef<Shard> shard, final Object expIDValue) {
         final NormalizedNode<?, ?> outerList = readStore(shard, TestModel.OUTER_LIST_PATH);
         assertNotNull(TestModel.OUTER_LIST_QNAME.getLocalName() + " not found", outerList);
         assertTrue(TestModel.OUTER_LIST_QNAME.getLocalName() + " value is not Iterable",
index 482f6965f19f5088e0f120fc865b629d1300bf20..2dd62ab72da29e0bed352eed95a79eb989faadbe 100644 (file)
@@ -33,7 +33,6 @@ import com.google.common.collect.ImmutableMap;
 import com.google.common.util.concurrent.FluentFuture;
 import com.typesafe.config.Config;
 import com.typesafe.config.ConfigFactory;
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -156,7 +155,7 @@ public abstract class AbstractTransactionProxyTest extends AbstractTest {
             .operationTimeoutInSeconds(operationTimeoutInSeconds);
 
     @BeforeClass
-    public static void setUpClass() throws IOException {
+    public static void setUpClass() {
 
         Config config = ConfigFactory.parseMap(ImmutableMap.<String, Object>builder()
                 .put("akka.actor.default-dispatcher.type",
@@ -166,7 +165,7 @@ public abstract class AbstractTransactionProxyTest extends AbstractTest {
     }
 
     @AfterClass
-    public static void tearDownClass() throws IOException {
+    public static void tearDownClass() {
         TestKit.shutdownActorSystem(system);
         system = null;
     }
index 62dba198e12597beb70e6d48b8824acdb6339557..af8931d8b7fc4b95fffa97386e34c58de66089b6 100644 (file)
@@ -29,7 +29,6 @@ import com.google.common.base.Throwables;
 import com.google.common.util.concurrent.CheckedFuture;
 import com.google.common.util.concurrent.Futures;
 import com.typesafe.config.ConfigFactory;
-import java.io.IOException;
 import java.math.BigInteger;
 import java.util.Collection;
 import java.util.concurrent.ExecutionException;
@@ -76,14 +75,14 @@ public class DataTreeCohortIntegrationTest {
             DatastoreContext.newBuilder().shardHeartbeatIntervalInMillis(100);
 
     @BeforeClass
-    public static void setUpClass() throws IOException {
+    public static void setUpClass() {
         system = ActorSystem.create("cluster-test", ConfigFactory.load().getConfig("Member1"));
         final Address member1Address = AddressFromURIString.parse("akka://cluster-test@127.0.0.1:2558");
         Cluster.get(system).join(member1Address);
     }
 
     @AfterClass
-    public static void tearDownClass() throws IOException {
+    public static void tearDownClass() {
         TestKit.shutdownActorSystem(system);
         system = null;
     }
index fe8ffe3dbca179bb6939c466fbd6f5085dbaa1c4..2c70977bfc183a8da60f55b5aa8c220e6bb573a6 100644 (file)
@@ -29,7 +29,6 @@ import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.MoreExecutors;
 import com.google.common.util.concurrent.Uninterruptibles;
 import com.typesafe.config.ConfigFactory;
-import java.io.IOException;
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -111,7 +110,7 @@ public class DistributedDataStoreIntegrationTest {
             .shardHeartbeatIntervalInMillis(100);
 
     @Before
-    public void setUp() throws IOException {
+    public void setUp() {
         InMemorySnapshotStore.clear();
         InMemoryJournal.clear();
         system = ActorSystem.create("cluster-test", ConfigFactory.load().getConfig("Member1"));
@@ -120,7 +119,7 @@ public class DistributedDataStoreIntegrationTest {
     }
 
     @After
-    public void tearDown() throws IOException {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system, Boolean.TRUE);
         system = null;
     }
index 8a4069e2e6125357e202efb5c7efc5fdf5bc856b..f3e6e4bbc950830fb8d72855f243a86987ba2c47 100644 (file)
@@ -46,7 +46,7 @@ public class DistributedDataStoreTest extends AbstractActorTest {
     private Timeout shardElectionTimeout;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
 
         schemaContext = TestModel.createTestContext();
index 41458f86fdaedd6319d11a2e19aea052c8b940ee..f9804c92e7299be349ca119c3b41efc3c7b43ff5 100644 (file)
@@ -20,7 +20,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
 public class ForwardingDataTreeChangeListenerTest extends AbstractActorTest {
 
     @Test
-    public void testOnDataChanged() throws Exception {
+    public void testOnDataChanged() {
         final ActorRef actorRef = getSystem().actorOf(MessageCollectorActor.props());
 
         ForwardingDataTreeChangeListener forwardingListener = new ForwardingDataTreeChangeListener(
index a7b9ae8e7eeb71dffaf54c868815fe06d9b44fce..5ddd8271ea381f21f083ea72986463acba924e8b 100644 (file)
@@ -366,8 +366,7 @@ public class IntegrationTestKit extends ShardTestKit {
     }
 
     @SuppressWarnings("checkstyle:IllegalCatch")
-    void assertExceptionOnCall(final Callable<Void> callable, final Class<? extends Exception> expType)
-            throws Exception {
+    void assertExceptionOnCall(final Callable<Void> callable, final Class<? extends Exception> expType) {
         try {
             callable.call();
             fail("Expected " + expType.getSimpleName());
@@ -377,7 +376,7 @@ public class IntegrationTestKit extends ShardTestKit {
     }
 
     void assertExceptionOnTxChainCreates(final DOMStoreTransactionChain txChain,
-            final Class<? extends Exception> expType) throws Exception {
+            final Class<? extends Exception> expType) {
         assertExceptionOnCall(() -> {
             txChain.newWriteOnlyTransaction();
             return null;
index 344ec10a809a97fce9bc27194fa678ffb7c22339..bbcedd681104eaa45b905ce981cb991e7aa3ee49 100644 (file)
@@ -28,7 +28,7 @@ import org.opendaylight.controller.cluster.raft.utils.MessageCollectorActor;
 public class RoleChangeNotifierTest extends AbstractActorTest {
 
     @Test
-    public void testHandleRegisterRoleChangeListener() throws Exception {
+    public void testHandleRegisterRoleChangeListener() {
         new TestKit(getSystem()) {
             {
                 String memberId = "testHandleRegisterRoleChangeListener";
@@ -51,7 +51,7 @@ public class RoleChangeNotifierTest extends AbstractActorTest {
     }
 
     @Test
-    public void testHandleRaftRoleChanged() throws Exception {
+    public void testHandleRaftRoleChanged() {
         new TestKit(getSystem()) {
             {
                 String memberId = "testHandleRegisterRoleChangeListenerWithNotificationSet";
@@ -88,7 +88,7 @@ public class RoleChangeNotifierTest extends AbstractActorTest {
     }
 
     @Test
-    public void testHandleLeaderStateChanged() throws Exception {
+    public void testHandleLeaderStateChanged() {
         new TestKit(getSystem()) {
             {
                 String actorId = "testHandleLeaderStateChanged";
index 5239ff785c3f07c8f983e56422f5a404fbc0e5b8..a7a265f00ef000ee944d632ab8b50ab98df043a7 100644 (file)
@@ -68,7 +68,7 @@ public class ShardCommitCoordinationTest extends AbstractShardTest {
      * even though it isn't at the head of the queues.
      */
     @Test
-    public void testTwoTransactionsWithSameTwoParticipatingShards() throws Exception {
+    public void testTwoTransactionsWithSameTwoParticipatingShards() {
         final String testName = "testTwoTransactionsWithSameTwoParticipatingShards";
         LOG.info("{} starting", testName);
 
@@ -180,7 +180,7 @@ public class ShardCommitCoordinationTest extends AbstractShardTest {
      * CanCommit is requested.
      */
     @Test
-    public void testMultipleTransactionsWithMixedParticipatingShards() throws Exception {
+    public void testMultipleTransactionsWithMixedParticipatingShards() {
         final String testName = "testMultipleTransactionsWithMixedParticipatingShards";
         LOG.info("{} starting", testName);
 
@@ -345,7 +345,7 @@ public class ShardCommitCoordinationTest extends AbstractShardTest {
      * When the tx's re committed verify the ready order is preserved.
      */
     @Test
-    public void testTwoTransactionsWithOneCommonParticipatingShard1() throws Exception {
+    public void testTwoTransactionsWithOneCommonParticipatingShard1() {
         final String testName = "testTwoTransactionsWithOneCommonParticipatingShard1";
         LOG.info("{} starting", testName);
 
@@ -458,7 +458,7 @@ public class ShardCommitCoordinationTest extends AbstractShardTest {
      * When the tx's re committed verify the ready order is preserved.
      */
     @Test
-    public void testTwoTransactionsWithOneCommonParticipatingShard2() throws Exception {
+    public void testTwoTransactionsWithOneCommonParticipatingShard2() {
         final String testName = "testTwoTransactionsWithOneCommonParticipatingShard2";
         LOG.info("{} starting", testName);
 
@@ -554,8 +554,7 @@ public class ShardCommitCoordinationTest extends AbstractShardTest {
         LOG.info("{} ending", testName);
     }
 
-    static void verifyInnerListEntry(TestActorRef<Shard> shard, int outerID, String innerID)
-            throws Exception {
+    static void verifyInnerListEntry(TestActorRef<Shard> shard, int outerID, String innerID) {
         final YangInstanceIdentifier path = innerEntryPath(outerID, innerID);
         final NormalizedNode<?, ?> innerListEntry = readStore(shard, path);
         assertNotNull(path + " not found", innerListEntry);
index eb829f116f5d4ef053538721d89a1de2a7a2d2d7..7db9b033b586fc1c0dd62e07e8fb00afde41a0c6 100644 (file)
@@ -42,7 +42,6 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
-import java.util.concurrent.ExecutionException;
 import java.util.function.Consumer;
 import org.junit.Before;
 import org.junit.Test;
@@ -83,17 +82,16 @@ public class ShardDataTreeTest extends AbstractTest {
     }
 
     @Test
-    public void testWrite() throws ExecutionException, InterruptedException {
+    public void testWrite() {
         modify(false, true, true);
     }
 
     @Test
-    public void testMerge() throws ExecutionException, InterruptedException {
+    public void testMerge() {
         modify(true, true, true);
     }
 
-    private void modify(final boolean merge, final boolean expectedCarsPresent, final boolean expectedPeoplePresent)
-            throws ExecutionException, InterruptedException {
+    private void modify(final boolean merge, final boolean expectedCarsPresent, final boolean expectedPeoplePresent) {
         immediatePayloadReplication(shardDataTree, mockShard);
 
         assertEquals(fullSchema, shardDataTree.getSchemaContext());
@@ -134,7 +132,7 @@ public class ShardDataTreeTest extends AbstractTest {
     }
 
     @Test
-    public void bug4359AddRemoveCarOnce() throws ExecutionException, InterruptedException {
+    public void bug4359AddRemoveCarOnce() {
         immediatePayloadReplication(shardDataTree, mockShard);
 
         final List<DataTreeCandidate> candidates = new ArrayList<>();
@@ -151,7 +149,7 @@ public class ShardDataTreeTest extends AbstractTest {
     }
 
     @Test
-    public void bug4359AddRemoveCarTwice() throws ExecutionException, InterruptedException {
+    public void bug4359AddRemoveCarTwice() {
         immediatePayloadReplication(shardDataTree, mockShard);
 
         final List<DataTreeCandidate> candidates = new ArrayList<>();
@@ -352,7 +350,7 @@ public class ShardDataTreeTest extends AbstractTest {
     }
 
     @Test
-    public void testPipelinedTransactionsWithImmediateReplication() throws Exception {
+    public void testPipelinedTransactionsWithImmediateReplication() {
         immediatePayloadReplication(shardDataTree, mockShard);
 
         final ShardDataTreeCohort cohort1 = newShardDataTreeCohort(snapshot ->
@@ -439,7 +437,7 @@ public class ShardDataTreeTest extends AbstractTest {
 
     @SuppressWarnings("unchecked")
     @Test
-    public void testAbortWithFailedRebase() throws Exception {
+    public void testAbortWithFailedRebase() {
         immediatePayloadReplication(shardDataTree, mockShard);
 
         final ShardDataTreeCohort cohort1 = newShardDataTreeCohort(snapshot ->
@@ -511,13 +509,11 @@ public class ShardDataTreeTest extends AbstractTest {
         return optional.get();
     }
 
-    private static DataTreeCandidate addCar(final ShardDataTree shardDataTree)
-            throws ExecutionException, InterruptedException {
+    private static DataTreeCandidate addCar(final ShardDataTree shardDataTree) {
         return addCar(shardDataTree, "altima");
     }
 
-    private static DataTreeCandidate addCar(final ShardDataTree shardDataTree, final String name)
-            throws ExecutionException, InterruptedException {
+    private static DataTreeCandidate addCar(final ShardDataTree shardDataTree, final String name) {
         return doTransaction(shardDataTree, snapshot -> {
             snapshot.merge(CarsModel.BASE_PATH, CarsModel.emptyContainer());
             snapshot.merge(CarsModel.CAR_LIST_PATH, CarsModel.newCarMapNode());
@@ -525,8 +521,7 @@ public class ShardDataTreeTest extends AbstractTest {
         });
     }
 
-    private static DataTreeCandidate removeCar(final ShardDataTree shardDataTree)
-            throws ExecutionException, InterruptedException {
+    private static DataTreeCandidate removeCar(final ShardDataTree shardDataTree) {
         return doTransaction(shardDataTree, snapshot -> snapshot.delete(CarsModel.newCarPath("altima")));
     }
 
@@ -536,7 +531,7 @@ public class ShardDataTreeTest extends AbstractTest {
     }
 
     private static DataTreeCandidate doTransaction(final ShardDataTree shardDataTree,
-            final DataTreeOperation operation) throws ExecutionException, InterruptedException {
+            final DataTreeOperation operation) {
         final ReadWriteShardDataTreeTransaction transaction =
                 shardDataTree.newReadWriteTransaction(nextTransactionId());
         final DataTreeModification snapshot = transaction.getSnapshot();
@@ -552,7 +547,7 @@ public class ShardDataTreeTest extends AbstractTest {
     }
 
     private static DataTreeCandidate applyCandidates(final ShardDataTree shardDataTree,
-            final List<DataTreeCandidate> candidates) throws ExecutionException, InterruptedException {
+            final List<DataTreeCandidate> candidates) {
         final ReadWriteShardDataTreeTransaction transaction =
                 shardDataTree.newReadWriteTransaction(nextTransactionId());
         final DataTreeModification snapshot = transaction.getSnapshot();
index e8f7e32310b8971de356a4cc3f26049f239b417b..4dbdce0c079fbfa8e0b53b4304817184a73c2cfc 100644 (file)
@@ -34,7 +34,6 @@ import akka.util.Timeout;
 import com.google.common.base.Stopwatch;
 import com.google.common.base.Throwables;
 import com.google.common.util.concurrent.Uninterruptibles;
-import java.io.IOException;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Map;
@@ -103,7 +102,6 @@ import org.opendaylight.controller.cluster.raft.utils.InMemoryJournal;
 import org.opendaylight.controller.cluster.raft.utils.MessageCollectorActor;
 import org.opendaylight.controller.md.cluster.datastore.model.SchemaContextHelper;
 import org.opendaylight.controller.md.cluster.datastore.model.TestModel;
-import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
 import org.opendaylight.yangtools.concepts.Identifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
@@ -166,7 +164,7 @@ public class ShardTest extends AbstractShardTest {
             boolean firstElectionTimeout = true;
 
             @Override
-            public Shard create() throws Exception {
+            public Shard create() {
                 return new Shard(newShardBuilder()) {
                     @Override
                     public void handleCommand(final Object message) {
@@ -267,7 +265,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testPeerAddressResolved() throws Exception {
+    public void testPeerAddressResolved() {
         new ShardTestKit(getSystem()) {
             {
                 final ShardIdentifier peerID = ShardIdentifier.create("inventory", MemberName.forName("member-2"),
@@ -433,7 +431,7 @@ public class ShardTest extends AbstractShardTest {
                 }
             }
 
-            void onSuccess(final Object resp) throws Exception {
+            void onSuccess(final Object resp) {
             }
         }
 
@@ -458,7 +456,7 @@ public class ShardTest extends AbstractShardTest {
             }
 
             @Override
-            void onSuccess(final Object resp) throws Exception {
+            void onSuccess(final Object resp) {
                 final CanCommitTransactionReply canCommitReply =
                         CanCommitTransactionReply.fromSerializable(resp);
                 assertEquals("Can commit", true, canCommitReply.getCanCommit());
@@ -566,7 +564,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testBatchedModificationsWithNoCommitOnReady() throws Exception {
+    public void testBatchedModificationsWithNoCommitOnReady() {
         new ShardTestKit(getSystem()) {
             {
                 final TestActorRef<Shard> shard = actorFactory.createTestActor(
@@ -619,7 +617,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testBatchedModificationsWithCommitOnReady() throws Exception {
+    public void testBatchedModificationsWithCommitOnReady() {
         new ShardTestKit(getSystem()) {
             {
                 final TestActorRef<Shard> shard = actorFactory.createTestActor(
@@ -688,7 +686,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testBatchedModificationsWithOperationFailure() throws Exception {
+    public void testBatchedModificationsWithOperationFailure() {
         new ShardTestKit(getSystem()) {
             {
                 final TestActorRef<Shard> shard = actorFactory.createTestActor(
@@ -727,7 +725,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testBatchedModificationsOnTransactionChain() throws Exception {
+    public void testBatchedModificationsOnTransactionChain() {
         new ShardTestKit(getSystem()) {
             {
                 final TestActorRef<Shard> shard = actorFactory.createTestActor(
@@ -790,7 +788,7 @@ public class ShardTest extends AbstractShardTest {
                     private static final long serialVersionUID = 1L;
 
                     @Override
-                    public Shard create() throws Exception {
+                    public Shard create() {
                         return new Shard(newShardBuilder()) {
                             @Override
                             protected boolean isLeader() {
@@ -855,16 +853,16 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testReadyWithReadWriteImmediateCommit() throws Exception {
+    public void testReadyWithReadWriteImmediateCommit() {
         testReadyWithImmediateCommit(true);
     }
 
     @Test
-    public void testReadyWithWriteOnlyImmediateCommit() throws Exception {
+    public void testReadyWithWriteOnlyImmediateCommit() {
         testReadyWithImmediateCommit(false);
     }
 
-    private void testReadyWithImmediateCommit(final boolean readWrite) throws Exception {
+    private void testReadyWithImmediateCommit(final boolean readWrite) {
         new ShardTestKit(getSystem()) {
             {
                 final TestActorRef<Shard> shard = actorFactory.createTestActor(
@@ -892,7 +890,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testReadyLocalTransactionWithImmediateCommit() throws Exception {
+    public void testReadyLocalTransactionWithImmediateCommit() {
         new ShardTestKit(getSystem()) {
             {
                 final TestActorRef<Shard> shard = actorFactory.createTestActor(
@@ -926,7 +924,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testReadyLocalTransactionWithThreePhaseCommit() throws Exception {
+    public void testReadyLocalTransactionWithThreePhaseCommit() {
         new ShardTestKit(getSystem()) {
             {
                 final TestActorRef<Shard> shard = actorFactory.createTestActor(
@@ -972,7 +970,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testReadWriteCommitWithPersistenceDisabled() throws Exception {
+    public void testReadWriteCommitWithPersistenceDisabled() {
         dataStoreContextBuilder.persistent(false);
         new ShardTestKit(getSystem()) {
             {
@@ -1314,7 +1312,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testAbortWithCommitPending() throws Exception {
+    public void testAbortWithCommitPending() {
         new ShardTestKit(getSystem()) {
             {
                 final Creator<Shard> creator = () -> new Shard(newShardBuilder()) {
@@ -1497,7 +1495,7 @@ public class ShardTest extends AbstractShardTest {
 //    }
 
     @Test
-    public void testTransactionCommitWithPriorExpiredCohortEntries() throws Exception {
+    public void testTransactionCommitWithPriorExpiredCohortEntries() {
         dataStoreContextBuilder.shardTransactionCommitTimeoutInSeconds(1);
         new ShardTestKit(getSystem()) {
             {
@@ -1536,7 +1534,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testTransactionCommitWithSubsequentExpiredCohortEntry() throws Exception {
+    public void testTransactionCommitWithSubsequentExpiredCohortEntry() {
         dataStoreContextBuilder.shardTransactionCommitTimeoutInSeconds(1);
         new ShardTestKit(getSystem()) {
             {
@@ -1596,7 +1594,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testCanCommitBeforeReadyFailure() throws Exception {
+    public void testCanCommitBeforeReadyFailure() {
         new ShardTestKit(getSystem()) {
             {
                 final TestActorRef<Shard> shard = actorFactory.createTestActor(
@@ -1663,7 +1661,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testAbortAfterReady() throws Exception {
+    public void testAbortAfterReady() {
         dataStoreContextBuilder.shardTransactionCommitTimeoutInSeconds(1);
         new ShardTestKit(getSystem()) {
             {
@@ -1708,7 +1706,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testAbortQueuedTransaction() throws Exception {
+    public void testAbortQueuedTransaction() {
         new ShardTestKit(getSystem()) {
             {
                 final TestActorRef<Shard> shard = actorFactory.createTestActor(
@@ -1835,7 +1833,7 @@ public class ShardTest extends AbstractShardTest {
             }
 
             private void awaitAndValidateSnapshot(final NormalizedNode<?, ?> expectedRoot)
-                    throws InterruptedException, IOException {
+                    throws InterruptedException {
                 assertEquals("Snapshot saved", true, latch.get().await(5, TimeUnit.SECONDS));
 
                 assertTrue("Invalid saved snapshot " + savedSnapshot.get(), savedSnapshot.get() instanceof Snapshot);
@@ -1846,8 +1844,7 @@ public class ShardTest extends AbstractShardTest {
                 savedSnapshot.set(null);
             }
 
-            private void verifySnapshot(final Snapshot snapshot, final NormalizedNode<?, ?> expectedRoot)
-                    throws IOException {
+            private void verifySnapshot(final Snapshot snapshot, final NormalizedNode<?, ?> expectedRoot) {
                 final NormalizedNode<?, ?> actual = ((ShardSnapshotState)snapshot.getState()).getSnapshot()
                         .getRootNode().get();
                 assertEquals("Root node", expectedRoot, actual);
@@ -1859,7 +1856,7 @@ public class ShardTest extends AbstractShardTest {
      * This test simply verifies that the applySnapShot logic will work.
      */
     @Test
-    public void testInMemoryDataTreeRestore() throws ReadFailedException, DataValidationFailedException {
+    public void testInMemoryDataTreeRestore() throws DataValidationFailedException {
         final DataTree store = new InMemoryDataTreeFactory().create(DataTreeConfiguration.DEFAULT_OPERATIONAL,
             SCHEMA_CONTEXT);
 
@@ -1939,7 +1936,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testRegisterRoleChangeListener() throws Exception {
+    public void testRegisterRoleChangeListener() {
         new ShardTestKit(getSystem()) {
             {
                 final TestActorRef<Shard> shard = actorFactory.createTestActor(
@@ -1976,7 +1973,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testFollowerInitialSyncStatus() throws Exception {
+    public void testFollowerInitialSyncStatus() {
         final TestActorRef<Shard> shard = actorFactory.createTestActor(
                 newShardProps().withDispatcher(Dispatchers.DefaultDispatcherId()),
                 "testFollowerInitialSyncStatus");
@@ -2110,7 +2107,7 @@ public class ShardTest extends AbstractShardTest {
     }
 
     @Test
-    public void testServerRemoved() throws Exception {
+    public void testServerRemoved() {
         final TestActorRef<MessageCollectorActor> parent = actorFactory.createTestActor(MessageCollectorActor.props()
                 .withDispatcher(Dispatchers.DefaultDispatcherId()));
 
index 0c894a38fb645ece7e28ae76487e315dfcb16469..d1f47852c621303d556de3e50a8d133a97470da1 100644 (file)
@@ -94,7 +94,7 @@ public class ShardTransactionTest extends AbstractActorTest {
     }
 
     @Test
-    public void testOnReceiveReadData() throws Exception {
+    public void testOnReceiveReadData() {
         new TestKit(getSystem()) {
             {
                 testOnReceiveReadData(newTransactionActor(RO, readOnlyTransaction(), "testReadDataRO"));
@@ -114,7 +114,7 @@ public class ShardTransactionTest extends AbstractActorTest {
     }
 
     @Test
-    public void testOnReceiveReadDataWhenDataNotFound() throws Exception {
+    public void testOnReceiveReadDataWhenDataNotFound() {
         new TestKit(getSystem()) {
             {
                 testOnReceiveReadDataWhenDataNotFound(
@@ -135,7 +135,7 @@ public class ShardTransactionTest extends AbstractActorTest {
     }
 
     @Test
-    public void testOnReceiveDataExistsPositive() throws Exception {
+    public void testOnReceiveDataExistsPositive() {
         new TestKit(getSystem()) {
             {
                 testOnReceiveDataExistsPositive(
@@ -157,7 +157,7 @@ public class ShardTransactionTest extends AbstractActorTest {
     }
 
     @Test
-    public void testOnReceiveDataExistsNegative() throws Exception {
+    public void testOnReceiveDataExistsNegative() {
         new TestKit(getSystem()) {
             {
                 testOnReceiveDataExistsNegative(
@@ -178,7 +178,7 @@ public class ShardTransactionTest extends AbstractActorTest {
     }
 
     @Test
-    public void testOnReceiveBatchedModifications() throws Exception {
+    public void testOnReceiveBatchedModifications() {
         new TestKit(getSystem()) {
             {
                 ShardDataTreeTransactionParent parent = Mockito.mock(ShardDataTreeTransactionParent.class);
@@ -220,7 +220,7 @@ public class ShardTransactionTest extends AbstractActorTest {
     }
 
     @Test
-    public void testOnReceiveBatchedModificationsReadyWithoutImmediateCommit() throws Exception {
+    public void testOnReceiveBatchedModificationsReadyWithoutImmediateCommit() {
         new TestKit(getSystem()) {
             {
                 final ActorRef transaction = newTransactionActor(WO, readWriteTransaction(),
@@ -255,7 +255,7 @@ public class ShardTransactionTest extends AbstractActorTest {
     }
 
     @Test
-    public void testOnReceiveBatchedModificationsReadyWithImmediateCommit() throws Exception {
+    public void testOnReceiveBatchedModificationsReadyWithImmediateCommit() {
         new TestKit(getSystem()) {
             {
                 final ActorRef transaction = newTransactionActor(WO, readWriteTransaction(),
@@ -357,7 +357,7 @@ public class ShardTransactionTest extends AbstractActorTest {
     }
 
     @Test
-    public void testReadWriteTxOnReceiveCloseTransaction() throws Exception {
+    public void testReadWriteTxOnReceiveCloseTransaction() {
         new TestKit(getSystem()) {
             {
                 final ActorRef transaction = newTransactionActor(RW, readWriteTransaction(),
@@ -374,7 +374,7 @@ public class ShardTransactionTest extends AbstractActorTest {
     }
 
     @Test
-    public void testWriteOnlyTxOnReceiveCloseTransaction() throws Exception {
+    public void testWriteOnlyTxOnReceiveCloseTransaction() {
         new TestKit(getSystem()) {
             {
                 final ActorRef transaction = newTransactionActor(WO, readWriteTransaction(),
@@ -391,7 +391,7 @@ public class ShardTransactionTest extends AbstractActorTest {
     }
 
     @Test
-    public void testReadOnlyTxOnReceiveCloseTransaction() throws Exception {
+    public void testReadOnlyTxOnReceiveCloseTransaction() {
         new TestKit(getSystem()) {
             {
                 final ActorRef transaction = newTransactionActor(TransactionType.READ_ONLY, readOnlyTransaction(),
index be19a3d0da804b78abf29489bfd5449aad53e5cb..34d36b058bbea8f35c5f5370df2ee8098e85918c 100644 (file)
@@ -53,7 +53,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest {
     private SimpleShardDataTreeCohort cohort;
 
     @Before
-    public void setup() throws Exception {
+    public void setup() {
         MockitoAnnotations.initMocks(this);
 
         doReturn(Optional.empty()).when(mockUserCohorts).commit();
@@ -64,7 +64,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest {
     }
 
     @Test
-    public void testCanCommitSuccess() throws Exception {
+    public void testCanCommitSuccess() {
         canCommitSuccess();
     }
 
@@ -82,7 +82,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest {
         verifyNoMoreInteractions(callback);
     }
 
-    private void testValidatationPropagates(final Exception cause) throws DataValidationFailedException {
+    private void testValidatationPropagates(final Exception cause) {
         doAnswer(invocation -> {
             invocation.getArgumentAt(0, SimpleShardDataTreeCohort.class).failedCanCommit(cause);
             return null;
@@ -97,17 +97,17 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest {
     }
 
     @Test
-    public void testCanCommitWithConflictingModEx() throws DataValidationFailedException {
+    public void testCanCommitWithConflictingModEx() {
         testValidatationPropagates(new ConflictingModificationAppliedException(YangInstanceIdentifier.EMPTY, "mock"));
     }
 
     @Test
-    public void testCanCommitWithDataValidationEx() throws DataValidationFailedException {
+    public void testCanCommitWithDataValidationEx() {
         testValidatationPropagates(new DataValidationFailedException(YangInstanceIdentifier.EMPTY, "mock"));
     }
 
     @Test
-    public void testCanCommitWithIllegalArgumentEx() throws DataValidationFailedException {
+    public void testCanCommitWithIllegalArgumentEx() {
         testValidatationPropagates(new IllegalArgumentException("mock"));
     }
 
@@ -131,7 +131,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest {
     }
 
     @Test
-    public void testPreCommitAndCommitSuccess() throws Exception {
+    public void testPreCommitAndCommitSuccess() {
         canCommitSuccess();
         final DataTreeCandidateTip candidate = preCommitSuccess();
 
@@ -152,7 +152,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest {
     }
 
     @Test
-    public void testPreCommitWithIllegalArgumentEx() throws Exception {
+    public void testPreCommitWithIllegalArgumentEx() {
         canCommitSuccess();
 
         final Exception cause = new IllegalArgumentException("mock");
@@ -172,7 +172,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest {
     }
 
     @Test
-    public void testPreCommitWithReportedFailure() throws Exception {
+    public void testPreCommitWithReportedFailure() {
         canCommitSuccess();
 
         final Exception cause = new IllegalArgumentException("mock");
index 62c03d7617ad12b2992903dda19c3d08c74e0a8d..1f9e2f7bde5aa21faf8ea4f6daa30f552dcf003e 100644 (file)
@@ -90,7 +90,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     interface Invoker {
-        FluentFuture<?> invoke(TransactionProxy proxy) throws Exception;
+        FluentFuture<?> invoke(TransactionProxy proxy);
     }
 
     @Test
@@ -329,7 +329,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testWrite() throws Exception {
+    public void testWrite() {
         dataStoreContextBuilder.shardBatchedModificationCount(1);
         ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
 
@@ -418,7 +418,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testMerge() throws Exception {
+    public void testMerge() {
         dataStoreContextBuilder.shardBatchedModificationCount(1);
         ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
 
@@ -434,7 +434,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testDelete() throws Exception {
+    public void testDelete() {
         dataStoreContextBuilder.shardBatchedModificationCount(1);
         ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
 
@@ -448,7 +448,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testReadWrite() throws Exception {
+    public void testReadWrite() {
         ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE);
 
         final NormalizedNode<?, ?> nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME);
@@ -476,7 +476,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testReadyWithReadWrite() throws Exception {
+    public void testReadyWithReadWrite() {
         ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE);
 
         final NormalizedNode<?, ?> nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME);
@@ -508,7 +508,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testReadyWithNoModifications() throws Exception {
+    public void testReadyWithNoModifications() {
         ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE);
 
         doReturn(readDataReply(null)).when(mockActorContext).executeOperationAsync(
@@ -533,7 +533,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testReadyWithMultipleShardWrites() throws Exception {
+    public void testReadyWithMultipleShardWrites() {
         ActorRef actorRef1 = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
 
         ActorRef actorRef2 = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY,
@@ -592,7 +592,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testReadyWithWriteOnlyAndLastBatchPending() throws Exception {
+    public void testReadyWithWriteOnlyAndLastBatchPending() {
         dataStoreContextBuilder.writeOnlyTransactionOptimizationsEnabled(true);
 
         ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
@@ -619,7 +619,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testReadyWithWriteOnlyAndLastBatchEmpty() throws Exception {
+    public void testReadyWithWriteOnlyAndLastBatchEmpty() {
         dataStoreContextBuilder.shardBatchedModificationCount(1).writeOnlyTransactionOptimizationsEnabled(true);
         ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
 
@@ -647,7 +647,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testReadyWithReplyFailure() throws Exception {
+    public void testReadyWithReplyFailure() {
         dataStoreContextBuilder.writeOnlyTransactionOptimizationsEnabled(true);
 
         ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
@@ -668,7 +668,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testReadyWithDebugContextEnabled() throws Exception {
+    public void testReadyWithDebugContextEnabled() {
         dataStoreContextBuilder.transactionDebugContextEnabled(true);
 
         ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE);
@@ -687,7 +687,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testReadyWithLocalTransaction() throws Exception {
+    public void testReadyWithLocalTransaction() {
         ActorRef shardActorRef = getSystem().actorOf(Props.create(DoNothingActor.class));
 
         doReturn(getSystem().actorSelection(shardActorRef.path())).when(mockActorContext)
@@ -715,7 +715,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testReadyWithLocalTransactionWithFailure() throws Exception {
+    public void testReadyWithLocalTransactionWithFailure() {
         ActorRef shardActorRef = getSystem().actorOf(Props.create(DoNothingActor.class));
 
         doReturn(getSystem().actorSelection(shardActorRef.path())).when(mockActorContext)
@@ -740,7 +740,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
         verifyCohortFutures((SingleCommitCohortProxy)ready, RuntimeException.class);
     }
 
-    private void testWriteOnlyTxWithFindPrimaryShardFailure(final Exception toThrow) throws Exception {
+    private void testWriteOnlyTxWithFindPrimaryShardFailure(final Exception toThrow) {
         doReturn(Futures.failed(toThrow)).when(mockActorContext).findPrimaryShardAsync(anyString());
 
         TransactionProxy transactionProxy = new TransactionProxy(mockComponentFactory, WRITE_ONLY);
@@ -761,22 +761,22 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testWriteOnlyTxWithPrimaryNotFoundException() throws Exception {
+    public void testWriteOnlyTxWithPrimaryNotFoundException() {
         testWriteOnlyTxWithFindPrimaryShardFailure(new PrimaryNotFoundException("mock"));
     }
 
     @Test
-    public void testWriteOnlyTxWithNotInitializedException() throws Exception {
+    public void testWriteOnlyTxWithNotInitializedException() {
         testWriteOnlyTxWithFindPrimaryShardFailure(new NotInitializedException("mock"));
     }
 
     @Test
-    public void testWriteOnlyTxWithNoShardLeaderException() throws Exception {
+    public void testWriteOnlyTxWithNoShardLeaderException() {
         testWriteOnlyTxWithFindPrimaryShardFailure(new NoShardLeaderException("mock"));
     }
 
     @Test
-    public void testReadyWithInvalidReplyMessageType() throws Exception {
+    public void testReadyWithInvalidReplyMessageType() {
         dataStoreContextBuilder.writeOnlyTransactionOptimizationsEnabled(true);
         ActorRef actorRef1 = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY);
 
@@ -812,7 +812,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testClose() throws Exception {
+    public void testClose() {
         ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE);
 
         doReturn(readDataReply(null)).when(mockActorContext).executeOperationAsync(
@@ -1299,7 +1299,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
                 .getOperationTimeoutInMillis()) * 2);
     }
 
-    private void testModificationOperationBatching(final TransactionType type) throws Exception {
+    private void testModificationOperationBatching(final TransactionType type) {
         int shardBatchedModificationCount = 3;
         dataStoreContextBuilder.shardBatchedModificationCount(shardBatchedModificationCount);
 
@@ -1358,17 +1358,17 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testReadWriteModificationOperationBatching() throws Exception {
+    public void testReadWriteModificationOperationBatching() {
         testModificationOperationBatching(READ_WRITE);
     }
 
     @Test
-    public void testWriteOnlyModificationOperationBatching() throws Exception {
+    public void testWriteOnlyModificationOperationBatching() {
         testModificationOperationBatching(WRITE_ONLY);
     }
 
     @Test
-    public void testOptimizedWriteOnlyModificationOperationBatching() throws Exception {
+    public void testOptimizedWriteOnlyModificationOperationBatching() {
         dataStoreContextBuilder.writeOnlyTransactionOptimizationsEnabled(true);
         testModificationOperationBatching(WRITE_ONLY);
     }
@@ -1461,7 +1461,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest {
     }
 
     @Test
-    public void testReadRoot() throws ReadFailedException, InterruptedException, ExecutionException,
+    public void testReadRoot() throws InterruptedException, ExecutionException,
             java.util.concurrent.TimeoutException {
         SchemaContext schemaContext = SchemaContextHelper.full();
         Configuration configuration = mock(Configuration.class);
index 0ae15d6c0833684c706f61441aad4acd22b8fb4a..f5d096bff8f56b20d286aa557345e78a96646f5a 100644 (file)
@@ -35,7 +35,7 @@ public class DataTreeNotificationListenerRegistrationActorTest extends AbstractA
     }
 
     @Test
-    public void testOnReceiveCloseListenerRegistrationAfterSetRegistration() throws Exception {
+    public void testOnReceiveCloseListenerRegistrationAfterSetRegistration() {
         new TestKit(getSystem()) {
             {
                 final ActorRef subject = getSystem().actorOf(DataTreeNotificationListenerRegistrationActor.props(),
@@ -57,7 +57,7 @@ public class DataTreeNotificationListenerRegistrationActorTest extends AbstractA
     }
 
     @Test
-    public void testOnReceiveCloseListenerRegistrationBeforeSetRegistration() throws Exception {
+    public void testOnReceiveCloseListenerRegistrationBeforeSetRegistration() {
         new TestKit(getSystem()) {
             {
                 final ActorRef subject = getSystem().actorOf(DataTreeNotificationListenerRegistrationActor.props(),
@@ -79,7 +79,7 @@ public class DataTreeNotificationListenerRegistrationActorTest extends AbstractA
     }
 
     @Test
-    public void testOnReceiveSetRegistrationAfterPriorClose() throws Exception {
+    public void testOnReceiveSetRegistrationAfterPriorClose() {
         new TestKit(getSystem()) {
             {
                 DataTreeNotificationListenerRegistrationActor.killDelay = 1000;
index c7013e81818887b3ab2f340e80d743fdefbf5d0f..4c8cfcc25b5ed8cc76e175bc19f04293aa2c01d9 100644 (file)
@@ -11,7 +11,6 @@ package org.opendaylight.controller.cluster.datastore.entityownership;
 import akka.actor.ActorSystem;
 import akka.testkit.javadsl.TestKit;
 import com.typesafe.config.ConfigFactory;
-import java.io.IOException;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 
@@ -20,12 +19,12 @@ public class AbstractClusterRefEntityOwnershipTest extends AbstractEntityOwnersh
     private static ActorSystem system;
 
     @BeforeClass
-    public static void setUpClass() throws IOException {
+    public static void setUpClass() {
         system = ActorSystem.create("test", ConfigFactory.load().getConfig("test-config"));
     }
 
     @AfterClass
-    public static void tearDownClass() throws IOException {
+    public static void tearDownClass() {
         TestKit.shutdownActorSystem(system);
         system = null;
     }
index 9eb974170bebedc12e3e58fb47435ab30813b680..d87b7dd27bde8518334d6d5f2b3341a4c2d554fe 100644 (file)
@@ -102,7 +102,7 @@ public class EntityOwnershipShardTest extends AbstractEntityOwnershipTest {
     }
 
     @Test
-    public void testOnRegisterCandidateLocal() throws Exception {
+    public void testOnRegisterCandidateLocal() {
         testLog.info("testOnRegisterCandidateLocal starting");
 
         ShardTestKit kit = new ShardTestKit(getSystem());
@@ -124,7 +124,7 @@ public class EntityOwnershipShardTest extends AbstractEntityOwnershipTest {
     }
 
     @Test
-    public void testOnRegisterCandidateLocalWithNoInitialLeader() throws Exception {
+    public void testOnRegisterCandidateLocalWithNoInitialLeader() {
         testLog.info("testOnRegisterCandidateLocalWithNoInitialLeader starting");
 
         final ShardTestKit kit = new ShardTestKit(getSystem());
@@ -159,7 +159,7 @@ public class EntityOwnershipShardTest extends AbstractEntityOwnershipTest {
     }
 
     @Test
-    public void testOnRegisterCandidateLocalWithNoInitialConsensus() throws Exception {
+    public void testOnRegisterCandidateLocalWithNoInitialConsensus() {
         testLog.info("testOnRegisterCandidateLocalWithNoInitialConsensus starting");
 
         final ShardTestKit kit = new ShardTestKit(getSystem());
@@ -244,7 +244,7 @@ public class EntityOwnershipShardTest extends AbstractEntityOwnershipTest {
     }
 
     @Test
-    public void testOnRegisterCandidateLocalWithRemoteLeader() throws Exception {
+    public void testOnRegisterCandidateLocalWithRemoteLeader() {
         testLog.info("testOnRegisterCandidateLocalWithRemoteLeader starting");
 
         ShardTestKit kit = new ShardTestKit(getSystem());
@@ -300,7 +300,7 @@ public class EntityOwnershipShardTest extends AbstractEntityOwnershipTest {
     }
 
     @Test
-    public void testOnUnregisterCandidateLocal() throws Exception {
+    public void testOnUnregisterCandidateLocal() {
         testLog.info("testOnUnregisterCandidateLocal starting");
 
         ShardTestKit kit = new ShardTestKit(getSystem());
@@ -336,7 +336,7 @@ public class EntityOwnershipShardTest extends AbstractEntityOwnershipTest {
     }
 
     @Test
-    public void testOwnershipChanges() throws Exception {
+    public void testOwnershipChanges() {
         testLog.info("testOwnershipChanges starting");
 
         final ShardTestKit kit = new ShardTestKit(getSystem());
@@ -1044,7 +1044,7 @@ public class EntityOwnershipShardTest extends AbstractEntityOwnershipTest {
     }
 
     @Test
-    public void testListenerRegistration() throws Exception {
+    public void testListenerRegistration() {
         testLog.info("testListenerRegistration starting");
 
         ShardTestKit kit = new ShardTestKit(getSystem());
@@ -1137,7 +1137,7 @@ public class EntityOwnershipShardTest extends AbstractEntityOwnershipTest {
     }
 
     @Test
-    public void testDelayedEntityOwnerSelectionWhenMaxPeerRequestsReceived() throws Exception {
+    public void testDelayedEntityOwnerSelectionWhenMaxPeerRequestsReceived() {
         testLog.info("testDelayedEntityOwnerSelectionWhenMaxPeerRequestsReceived starting");
 
         ShardTestKit kit = new ShardTestKit(getSystem());
@@ -1179,7 +1179,7 @@ public class EntityOwnershipShardTest extends AbstractEntityOwnershipTest {
     }
 
     @Test
-    public void testDelayedEntityOwnerSelection() throws Exception {
+    public void testDelayedEntityOwnerSelection() {
         testLog.info("testDelayedEntityOwnerSelection starting");
 
         final ShardTestKit kit = new ShardTestKit(getSystem());
index 8e1b4da9e68cf6186b8edb6526d0256ee2586066..1f04e5fcf1b4d7f7a6d8c021e9a615ffee47fda4 100644 (file)
@@ -12,7 +12,6 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertTrue;
 
-import java.io.IOException;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
@@ -23,7 +22,7 @@ import org.mockito.MockitoAnnotations;
 public class EntityOwnerSelectionStrategyConfigReaderTest {
 
     @Before
-    public void setup() throws IOException {
+    public void setup() {
         MockitoAnnotations.initMocks(this);
     }
 
index bd387cd74010f2e85a8124adda3566a63bbdf15f..6548fe9eb36a55536a62db7569ef631854aa0a02 100644 (file)
@@ -280,7 +280,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         final Creator<ShardManager> creator = new Creator<ShardManager>() {
             private static final long serialVersionUID = 1L;
             @Override
-            public ShardManager create() throws Exception {
+            public ShardManager create() {
                 return new LocalShardManager(
                         new GenericCreator<>(LocalShardManager.class).datastoreContextFactory(mockFactory)
                                 .primaryShardInfoCache(primaryShardInfoCache).configuration(mockConfig));
@@ -323,7 +323,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindPrimaryForNonExistentShard() throws Exception {
+    public void testOnReceiveFindPrimaryForNonExistentShard() {
         new TestKit(getSystem()) {
             {
                 final ActorRef shardManager = actorFactory.createActor(newPropsShardMgrWithMockShardActor());
@@ -338,7 +338,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindPrimaryForLocalLeaderShard() throws Exception {
+    public void testOnReceiveFindPrimaryForLocalLeaderShard() {
         LOG.info("testOnReceiveFindPrimaryForLocalLeaderShard starting");
         new TestKit(getSystem()) {
             {
@@ -372,7 +372,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindPrimaryForNonLocalLeaderShardBeforeMemberUp() throws Exception {
+    public void testOnReceiveFindPrimaryForNonLocalLeaderShardBeforeMemberUp() {
         LOG.info("testOnReceiveFindPrimaryForNonLocalLeaderShardBeforeMemberUp starting");
         new TestKit(getSystem()) {
             {
@@ -399,7 +399,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindPrimaryForNonLocalLeaderShard() throws Exception {
+    public void testOnReceiveFindPrimaryForNonLocalLeaderShard() {
         LOG.info("testOnReceiveFindPrimaryForNonLocalLeaderShard starting");
         new TestKit(getSystem()) {
             {
@@ -432,7 +432,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindPrimaryForUninitializedShard() throws Exception {
+    public void testOnReceiveFindPrimaryForUninitializedShard() {
         new TestKit(getSystem()) {
             {
                 final ActorRef shardManager = actorFactory.createActor(newPropsShardMgrWithMockShardActor());
@@ -445,7 +445,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindPrimaryForInitializedShardWithNoRole() throws Exception {
+    public void testOnReceiveFindPrimaryForInitializedShardWithNoRole() {
         new TestKit(getSystem()) {
             {
                 final ActorRef shardManager = actorFactory.createActor(newPropsShardMgrWithMockShardActor());
@@ -461,7 +461,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindPrimaryForFollowerShardWithNoInitialLeaderId() throws Exception {
+    public void testOnReceiveFindPrimaryForFollowerShardWithNoInitialLeaderId() {
         LOG.info("testOnReceiveFindPrimaryForFollowerShardWithNoInitialLeaderId starting");
         new TestKit(getSystem()) {
             {
@@ -497,7 +497,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindPrimaryWaitForShardLeader() throws Exception {
+    public void testOnReceiveFindPrimaryWaitForShardLeader() {
         LOG.info("testOnReceiveFindPrimaryWaitForShardLeader starting");
         datastoreContextBuilder.shardInitializationTimeout(10, TimeUnit.SECONDS);
         new TestKit(getSystem()) {
@@ -543,7 +543,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindPrimaryWaitForReadyWithUninitializedShard() throws Exception {
+    public void testOnReceiveFindPrimaryWaitForReadyWithUninitializedShard() {
         LOG.info("testOnReceiveFindPrimaryWaitForReadyWithUninitializedShard starting");
         new TestKit(getSystem()) {
             {
@@ -565,7 +565,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindPrimaryWaitForReadyWithCandidateShard() throws Exception {
+    public void testOnReceiveFindPrimaryWaitForReadyWithCandidateShard() {
         LOG.info("testOnReceiveFindPrimaryWaitForReadyWithCandidateShard starting");
         new TestKit(getSystem()) {
             {
@@ -586,7 +586,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindPrimaryWaitForReadyWithIsolatedLeaderShard() throws Exception {
+    public void testOnReceiveFindPrimaryWaitForReadyWithIsolatedLeaderShard() {
         LOG.info("testOnReceiveFindPrimaryWaitForReadyWithIsolatedLeaderShard starting");
         new TestKit(getSystem()) {
             {
@@ -607,7 +607,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindPrimaryWaitForReadyWithNoRoleShard() throws Exception {
+    public void testOnReceiveFindPrimaryWaitForReadyWithNoRoleShard() {
         LOG.info("testOnReceiveFindPrimaryWaitForReadyWithNoRoleShard starting");
         new TestKit(getSystem()) {
             {
@@ -626,7 +626,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindPrimaryForRemoteShard() throws Exception {
+    public void testOnReceiveFindPrimaryForRemoteShard() {
         LOG.info("testOnReceiveFindPrimaryForRemoteShard starting");
         String shardManagerID = ShardManagerIdentifier.builder().type(shardMrgIDSuffix).build().toString();
 
@@ -699,7 +699,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testShardAvailabilityOnChangeOfMemberReachability() throws Exception {
+    public void testShardAvailabilityOnChangeOfMemberReachability() {
         LOG.info("testShardAvailabilityOnChangeOfMemberReachability starting");
         String shardManagerID = ShardManagerIdentifier.builder().type(shardMrgIDSuffix).build().toString();
 
@@ -821,7 +821,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testShardAvailabilityChangeOnMemberUnreachableAndLeadershipChange() throws Exception {
+    public void testShardAvailabilityChangeOnMemberUnreachableAndLeadershipChange() {
         LOG.info("testShardAvailabilityChangeOnMemberUnreachableAndLeadershipChange starting");
         String shardManagerID = ShardManagerIdentifier.builder().type(shardMrgIDSuffix).build().toString();
 
@@ -916,7 +916,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testShardAvailabilityChangeOnMemberWithNameContainedInLeaderIdUnreachable() throws Exception {
+    public void testShardAvailabilityChangeOnMemberWithNameContainedInLeaderIdUnreachable() {
         LOG.info("testShardAvailabilityChangeOnMemberWithNameContainedInLeaderIdUnreachable starting");
         String shardManagerID = ShardManagerIdentifier.builder().type(shardMrgIDSuffix).build().toString();
 
@@ -1017,7 +1017,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindLocalShardForNonExistentShard() throws Exception {
+    public void testOnReceiveFindLocalShardForNonExistentShard() {
         new TestKit(getSystem()) {
             {
                 final ActorRef shardManager = actorFactory.createActor(newPropsShardMgrWithMockShardActor());
@@ -1034,7 +1034,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindLocalShardForExistentShard() throws Exception {
+    public void testOnReceiveFindLocalShardForExistentShard() {
         new TestKit(getSystem()) {
             {
                 final ActorRef shardManager = actorFactory.createActor(newPropsShardMgrWithMockShardActor());
@@ -1053,7 +1053,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveFindLocalShardForNotInitializedShard() throws Exception {
+    public void testOnReceiveFindLocalShardForNotInitializedShard() {
         new TestKit(getSystem()) {
             {
                 final ActorRef shardManager = actorFactory.createActor(newPropsShardMgrWithMockShardActor());
@@ -1163,7 +1163,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testByDefaultSyncStatusIsFalse() throws Exception {
+    public void testByDefaultSyncStatusIsFalse() {
         TestShardManager shardManager = newTestShardManager();
 
         assertEquals(false, shardManager.getMBean().getSyncStatus());
@@ -1265,7 +1265,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testOnReceiveSwitchShardBehavior() throws Exception {
+    public void testOnReceiveSwitchShardBehavior() {
         new TestKit(getSystem()) {
             {
                 final ActorRef shardManager = actorFactory.createActor(newPropsShardMgrWithMockShardActor());
@@ -1405,7 +1405,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testGetSnapshot() throws Exception {
+    public void testGetSnapshot() {
         LOG.info("testGetSnapshot starting");
         TestKit kit = new TestKit(getSystem());
 
@@ -1467,7 +1467,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testRestoreFromSnapshot() throws Exception {
+    public void testRestoreFromSnapshot() {
         LOG.info("testRestoreFromSnapshot starting");
 
         datastoreContextBuilder.shardInitializationTimeout(3, TimeUnit.SECONDS);
@@ -1507,7 +1507,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testAddShardReplicaForNonExistentShardConfig() throws Exception {
+    public void testAddShardReplicaForNonExistentShardConfig() {
         new TestKit(getSystem()) {
             {
                 ActorRef shardManager = actorFactory
@@ -1523,7 +1523,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testAddShardReplica() throws Exception {
+    public void testAddShardReplica() {
         LOG.info("testAddShardReplica starting");
         MockConfiguration mockConfig = new MockConfiguration(
                 ImmutableMap.<String, List<String>>builder().put("default", Arrays.asList("member-1", "member-2"))
@@ -1610,7 +1610,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testAddShardReplicaWithPreExistingReplicaInRemoteShardLeader() throws Exception {
+    public void testAddShardReplicaWithPreExistingReplicaInRemoteShardLeader() {
         LOG.info("testAddShardReplicaWithPreExistingReplicaInRemoteShardLeader starting");
         new TestKit(getSystem()) {
             {
@@ -1672,7 +1672,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testAddShardReplicaWithPreExistingLocalReplicaLeader() throws Exception {
+    public void testAddShardReplicaWithPreExistingLocalReplicaLeader() {
         LOG.info("testAddShardReplicaWithPreExistingLocalReplicaLeader starting");
         new TestKit(getSystem()) {
             {
@@ -1700,7 +1700,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testAddShardReplicaWithAddServerReplyFailure() throws Exception {
+    public void testAddShardReplicaWithAddServerReplyFailure() {
         LOG.info("testAddShardReplicaWithAddServerReplyFailure starting");
         new TestKit(getSystem()) {
             {
@@ -1748,13 +1748,13 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testAddShardReplicaWithAlreadyInProgress() throws Exception {
+    public void testAddShardReplicaWithAlreadyInProgress() {
         testServerChangeWhenAlreadyInProgress("astronauts", new AddShardReplica("astronauts"),
                 AddServer.class, new AddShardReplica("astronauts"));
     }
 
     @Test
-    public void testAddShardReplicaWithFindPrimaryTimeout() throws Exception {
+    public void testAddShardReplicaWithFindPrimaryTimeout() {
         LOG.info("testAddShardReplicaWithFindPrimaryTimeout starting");
         datastoreContextBuilder.shardInitializationTimeout(100, TimeUnit.MILLISECONDS);
         new TestKit(getSystem()) {
@@ -1780,7 +1780,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testRemoveShardReplicaForNonExistentShard() throws Exception {
+    public void testRemoveShardReplicaForNonExistentShard() {
         new TestKit(getSystem()) {
             {
                 ActorRef shardManager = actorFactory
@@ -1798,7 +1798,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     /**
      * Primary is Local.
      */
-    public void testRemoveShardReplicaLocal() throws Exception {
+    public void testRemoveShardReplicaLocal() {
         new TestKit(getSystem()) {
             {
                 String memberId = "member-1-shard-default-" + shardMrgIDSuffix;
@@ -1827,7 +1827,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testRemoveShardReplicaRemote() throws Exception {
+    public void testRemoveShardReplicaRemote() {
         MockConfiguration mockConfig = new MockConfiguration(
                 ImmutableMap.<String, List<String>>builder().put("default", Arrays.asList("member-1", "member-2"))
                         .put("astronauts", Arrays.asList("member-1")).build());
@@ -1918,13 +1918,13 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testRemoveShardReplicaWhenAnotherRemoveShardReplicaAlreadyInProgress() throws Exception {
+    public void testRemoveShardReplicaWhenAnotherRemoveShardReplicaAlreadyInProgress() {
         testServerChangeWhenAlreadyInProgress("astronauts", new RemoveShardReplica("astronauts", MEMBER_2),
                 RemoveServer.class, new RemoveShardReplica("astronauts", MEMBER_3));
     }
 
     @Test
-    public void testRemoveShardReplicaWhenAddShardReplicaAlreadyInProgress() throws Exception {
+    public void testRemoveShardReplicaWhenAddShardReplicaAlreadyInProgress() {
         testServerChangeWhenAlreadyInProgress("astronauts", new AddShardReplica("astronauts"),
                 AddServer.class, new RemoveShardReplica("astronauts", MEMBER_2));
     }
@@ -1932,7 +1932,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
 
     public void testServerChangeWhenAlreadyInProgress(final String shardName, final Object firstServerChange,
                                                       final Class<?> firstForwardedServerChangeClass,
-                                                      final Object secondServerChange) throws Exception {
+                                                      final Object secondServerChange) {
         new TestKit(getSystem()) {
             {
                 TestKit mockShardLeaderKit = new TestKit(getSystem());
@@ -1964,7 +1964,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testServerRemovedShardActorNotRunning() throws Exception {
+    public void testServerRemovedShardActorNotRunning() {
         LOG.info("testServerRemovedShardActorNotRunning starting");
         new TestKit(getSystem()) {
             {
@@ -1997,7 +1997,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testServerRemovedShardActorRunning() throws Exception {
+    public void testServerRemovedShardActorRunning() {
         LOG.info("testServerRemovedShardActorRunning starting");
         new TestKit(getSystem()) {
             {
@@ -2034,7 +2034,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testShardPersistenceWithRestoredData() throws Exception {
+    public void testShardPersistenceWithRestoredData() {
         LOG.info("testShardPersistenceWithRestoredData starting");
         new TestKit(getSystem()) {
             {
@@ -2119,7 +2119,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testChangeServersVotingStatus() throws Exception {
+    public void testChangeServersVotingStatus() {
         new TestKit(getSystem()) {
             {
                 String memberId = "member-1-shard-default-" + shardMrgIDSuffix;
@@ -2155,7 +2155,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
     }
 
     @Test
-    public void testChangeServersVotingStatusWithNoLeader() throws Exception {
+    public void testChangeServersVotingStatusWithNoLeader() {
         new TestKit(getSystem()) {
             {
                 String memberId = "member-1-shard-default-" + shardMrgIDSuffix;
index 08293d2dc987630cebfea614d9a62587b2953418..4d11cece57baa0feedd362789518962b224ddc47 100644 (file)
@@ -14,7 +14,7 @@ import org.opendaylight.controller.md.cluster.datastore.model.TestModel;
 
 public class DefaultShardStrategyTest {
     @Test
-    public void testFindShard() throws Exception {
+    public void testFindShard() {
         String shard = DefaultShardStrategy.getInstance().findShard(TestModel.TEST_PATH);
         Assert.assertEquals(DefaultShardStrategy.DEFAULT_SHARD, shard);
     }
index 9ec28431e1be2437c055a70293914cf6e0827974..036e881166883730cf012e67e04b2c811c9bf8c9 100644 (file)
@@ -33,7 +33,7 @@ public class ModuleShardStrategyTest {
 
 
     @Test
-    public void testFindShard() throws Exception {
+    public void testFindShard() {
         ModuleShardStrategy moduleShardStrategy =
             new ModuleShardStrategy("cars", configuration);
 
index 2cc33e49cc6bfe6c5d2ca4119f16e04451c48946..89a50b84e446fe4e8bc99191f8c83ff7799e5765 100644 (file)
@@ -85,7 +85,7 @@ public class ActorContextTest extends AbstractActorTest {
             this.actorRef = actorRef;
         }
 
-        @Override public void onReceive(final Object message) throws Exception {
+        @Override public void onReceive(final Object message) {
             if (message instanceof FindPrimary) {
                 FindPrimary fp = (FindPrimary)message;
                 Object resp = findPrimaryResponses.get(fp.getShardName());
@@ -133,7 +133,7 @@ public class ActorContextTest extends AbstractActorTest {
             }
 
             @Override
-            public MockShardManager create() throws Exception {
+            public MockShardManager create() {
                 return new MockShardManager(found, actorRef);
             }
         }
@@ -427,17 +427,17 @@ public class ActorContextTest extends AbstractActorTest {
     }
 
     @Test
-    public void testFindPrimaryShardAsyncPrimaryNotFound() throws Exception {
+    public void testFindPrimaryShardAsyncPrimaryNotFound() {
         testFindPrimaryExceptions(new PrimaryNotFoundException("not found"));
     }
 
     @Test
-    public void testFindPrimaryShardAsyncActorNotInitialized() throws Exception {
+    public void testFindPrimaryShardAsyncActorNotInitialized() {
         testFindPrimaryExceptions(new NotInitializedException("not initialized"));
     }
 
     @SuppressWarnings("checkstyle:IllegalCatch")
-    private static void testFindPrimaryExceptions(final Object expectedException) throws Exception {
+    private static void testFindPrimaryExceptions(final Object expectedException) {
         ActorRef shardManager = getSystem().actorOf(MessageCollectorActor.props());
 
         DatastoreContext dataStoreContext = DatastoreContext.newBuilder()
index 92c6349ba6ac353d35ebf827b765574d9356e17a..790d6443a07c49204066867d8240c13d45506ca5 100644 (file)
@@ -19,7 +19,7 @@ public final class ForwardingActor extends UntypedActor {
     }
 
     @Override
-    public void onReceive(final Object obj) throws Exception {
+    public void onReceive(final Object obj) {
         target.forward(obj, context());
     }
 
index 7ae05bd11a8cbc0590d42181dbd5dcfa31c4ef90..fd2fa48f3c89b424955637e79bb4434717fbae28 100644 (file)
@@ -22,7 +22,6 @@ import org.opendaylight.controller.md.cluster.datastore.model.CarsModel;
 import org.opendaylight.controller.md.cluster.datastore.model.SchemaContextHelper;
 import org.opendaylight.controller.md.cluster.datastore.model.TestModel;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.mdsal.common.api.ReadFailedException;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadTransaction;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreThreePhaseCommitCohort;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreWriteTransaction;
@@ -38,8 +37,8 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 public class NormalizedNodeAggregatorTest {
 
     @Test
-    public void testAggregate() throws InterruptedException, ExecutionException, ReadFailedException,
-            DataValidationFailedException {
+    public void testAggregate() throws InterruptedException, ExecutionException,
+        DataValidationFailedException {
         SchemaContext schemaContext = SchemaContextHelper.full();
         NormalizedNode<?, ?> expectedNode1 = ImmutableNodes.containerNode(TestModel.TEST_QNAME);
         NormalizedNode<?, ?> expectedNode2 = ImmutableNodes.containerNode(CarsModel.CARS_QNAME);
index 6a346202fb0469b4f0ad76441978ed1e1acebcb6..21ca10b5c222f9d609c8857fed02cd1a7b009c91 100644 (file)
@@ -76,7 +76,7 @@ public class DistributedShardFrontendTest {
     private DOMStoreThreePhaseCommitCohort commitCohort;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
         shardedDOMDataTree = new ShardedDOMDataTree();
         client = mock(DataStoreClient.class);
index 8d5351ca90ad991a778ebfe29abb68ba9eca4cb0..d35199c1ce756e59a531a6e159719c42e7ba9ab6 100644 (file)
@@ -149,7 +149,7 @@ public class DistributedShardedDOMDataTreeTest extends AbstractTest {
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         if (leaderDistributedDataStore != null) {
             leaderDistributedDataStore.close();
         }
index f0be8bb8005e2fbfb875f75770868e0e9dfaaf8d..f36a75d6683c066492965ad43dcd30a816be0f08 100644 (file)
@@ -127,7 +127,7 @@ public class DOMTransactionChainTest {
 
     @Test
     @SuppressWarnings("checkstyle:IllegalCatch")
-    public void testTransactionChainNotSealed() throws InterruptedException, ExecutionException, TimeoutException {
+    public void testTransactionChainNotSealed() throws InterruptedException, ExecutionException {
         BlockingTransactionChainListener listener = new BlockingTransactionChainListener();
         DOMTransactionChain txChain = domBroker.createTransactionChain(listener);
         assertNotNull(txChain);
index 93d5c67bbc12f463bb29aebf1c9d2d452fc76251..a25a0814c26f77b3bb6de0942d089bc8e76d304d 100644 (file)
@@ -14,12 +14,12 @@ import akka.actor.UntypedActor;
 
 public class DummyShardManager extends UntypedActor {
     public DummyShardManager(Configuration configuration, String memberName, String[] shardNames,
-            String type) throws Exception {
+            String type) {
         new DummyShardsCreator(configuration, context(), memberName, shardNames, type).create();
     }
 
     @Override
-    public void onReceive(Object message) throws Exception {
+    public void onReceive(Object message) {
 
     }
 
index 72e06d63a81b32dde1bf5592d9076449d6faf9b3..4b80a1638511d55ba707ef89936f339b612767fb 100644 (file)
@@ -303,7 +303,7 @@ public class InMemoryDataStoreTest {
     }
 
     @Test(expected = IllegalStateException.class)
-    public void testWriteWithTransactionReady() throws Exception {
+    public void testWriteWithTransactionReady() {
 
         DOMStoreWriteTransaction writeTx = domStore.newWriteOnlyTransaction();
 
@@ -314,7 +314,7 @@ public class InMemoryDataStoreTest {
     }
 
     @Test(expected = IllegalStateException.class)
-    public void testReadyWithTransactionAlreadyReady() throws Exception {
+    public void testReadyWithTransactionAlreadyReady() {
 
         DOMStoreWriteTransaction writeTx = domStore.newWriteOnlyTransaction();
 
index 5a8591330c4c6879456c04dc7576a87fcb7f129f..046b204121aa084de311f7f63f39f47d91909df2 100644 (file)
@@ -82,7 +82,7 @@ final class RemoteDOMRpcFuture extends AbstractFuture<DOMRpcResult>
     private final class FutureUpdater extends OnComplete<Object> {
 
         @Override
-        public void onComplete(final Throwable error, final Object reply) throws Throwable {
+        public void onComplete(final Throwable error, final Object reply) {
             if (error != null) {
                 RemoteDOMRpcFuture.this.failNow(error);
             } else if (reply instanceof RpcResponse) {
index 64999743a4202bd5f51fa42ac7dc20d85e6331ac..957b95da6453d6bd7c9927e8f79f79c29c04f5b2 100644 (file)
@@ -51,7 +51,7 @@ final class RpcRegistrar extends AbstractUntypedActor {
     }
 
     @Override
-    protected void handleReceive(final Object message) throws Exception {
+    protected void handleReceive(final Object message) {
         if (message instanceof UpdateRemoteEndpoints) {
             updateRemoteEndpoints(((UpdateRemoteEndpoints) message).getEndpoints());
         } else {
index c52ba2a747bfc45899413efe0cd5eb014db57b1a..127238942bdb7328ce9d946eca12479a8c8242f9 100644 (file)
@@ -21,7 +21,7 @@ public class TerminationMonitor extends UntypedActor {
         LOG.debug("Created TerminationMonitor");
     }
 
-    @Override public void onReceive(Object message) throws Exception {
+    @Override public void onReceive(Object message) {
         if (message instanceof Terminated) {
             Terminated terminated = (Terminated) message;
             LOG.debug("Actor terminated : {}", terminated.actor());
index 2d86ac0f2014a29b12d3b9ddfbd05e8ee1c77b2a..421e13ecb589ec3ced6108a0121a33e93c53ebf5 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.controller.remote.rpc.messages;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.io.Externalizable;
-import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import java.io.Serializable;
@@ -54,12 +53,12 @@ public class RpcResponse implements Serializable {
         }
 
         @Override
-        public void writeExternal(ObjectOutput out) throws IOException {
+        public void writeExternal(ObjectOutput out) {
             SerializationUtils.serializeNormalizedNode(rpcResponse.getResultNormalizedNode(), out);
         }
 
         @Override
-        public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+        public void readExternal(ObjectInput in) {
             rpcResponse = new RpcResponse(SerializationUtils.deserializeNormalizedNode(in));
         }
 
index 84a70425136d31dd6c3f6c242f6afc4e11d6286a..a0f52d1b15740367b427f05f4f79477f294acf24 100644 (file)
@@ -191,7 +191,7 @@ public abstract class BucketStoreActor<T extends BucketData<T>> extends
     }
 
     @Override
-    protected final void handleRecover(final Object message) throws Exception {
+    protected final void handleRecover(final Object message) {
         if (message instanceof RecoveryCompleted) {
             if (incarnation != null) {
                 incarnation = incarnation + 1;
index 2a4e3b7f93252b2c411025b777defdbfb287830c..56060dd714ff12b6e29120abe5b766673fa788d0 100644 (file)
@@ -140,7 +140,7 @@ public class Gossiper extends AbstractUntypedActorWithMetering {
     }
 
     @Override
-    protected void handleReceive(final Object message) throws Exception {
+    protected void handleReceive(final Object message) {
         //Usually sent by self via gossip task defined above. But its not enforced.
         //These ticks can be sent by another actor as well which is esp. useful while testing
         if (GOSSIP_TICK.equals(message)) {
index 8b3b93571d641935668f193c152395b1cb5228d1..034205ba04df1a62ecef353ed605ef86f533392f 100644 (file)
@@ -38,7 +38,6 @@ import org.opendaylight.yangtools.yang.data.impl.schema.Builders;
 import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
-import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
 
 /**
@@ -81,7 +80,7 @@ public class AbstractRpcTest {
     protected DOMRpcService domRpcService2;
 
     @BeforeClass
-    public static void setup() throws InterruptedException {
+    public static void setup() {
         config1 = new RemoteRpcProviderConfig.Builder("memberA").build();
         config2 = new RemoteRpcProviderConfig.Builder("memberB").build();
         node1 = ActorSystem.create("opendaylight-rpc", config1.get());
@@ -97,7 +96,7 @@ public class AbstractRpcTest {
     }
 
     @Before
-    public void setUp() throws ReactorException {
+    public void setUp() {
         schemaContext = YangParserTestUtils.parseYangResources(AbstractRpcTest.class, "/test-rpc.yang");
 
         MockitoAnnotations.initMocks(this);
index 8ec5d7af6b87be0c6b4a604f5ddbc59fa6e6f9ae..a6be665ead8c633764c2999411d6c95b342329f6 100644 (file)
@@ -87,7 +87,7 @@ public class RemoteRpcProviderConfigTest {
         }
 
         @Override
-        public void onReceive(Object message) throws Exception {
+        public void onReceive(Object message) {
         }
 
         /**
index 14e0cae426262d595ac6eb120d48660b394bbfa5..31e103234ef46d2ac1b509cda0f08d10b2e74484 100644 (file)
@@ -29,33 +29,33 @@ public class RemoteRpcProviderFactoryTest {
     private RemoteRpcProviderConfig providerConfig;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         initMocks(this);
     }
 
     @Test
-    public void testCreateInstance() throws Exception {
+    public void testCreateInstance() {
         Assert.assertNotNull(RemoteRpcProviderFactory
                 .createInstance(providerService, rpcService, actorSystem, providerConfig));
     }
 
     @Test(expected = NullPointerException.class)
-    public void testCreateInstanceMissingProvideService() throws Exception {
+    public void testCreateInstanceMissingProvideService() {
         RemoteRpcProviderFactory.createInstance(null, rpcService, actorSystem, providerConfig);
     }
 
     @Test(expected = NullPointerException.class)
-    public void testCreateInstanceMissingRpcService() throws Exception {
+    public void testCreateInstanceMissingRpcService() {
         RemoteRpcProviderFactory.createInstance(providerService, null, actorSystem, providerConfig);
     }
 
     @Test(expected = NullPointerException.class)
-    public void testCreateInstanceMissingActorSystem() throws Exception {
+    public void testCreateInstanceMissingActorSystem() {
         RemoteRpcProviderFactory.createInstance(providerService, rpcService, null, providerConfig);
     }
 
     @Test(expected = NullPointerException.class)
-    public void testCreateInstanceMissingProviderConfig() throws Exception {
+    public void testCreateInstanceMissingProviderConfig() {
         RemoteRpcProviderFactory.createInstance(providerService, rpcService, actorSystem, null);
     }
 }
\ No newline at end of file
index 81916c43d11a6cf34ff5f8459a84a3172a4906de..e61856af61cfb32773e365e1f7486ba06a36ca33 100644 (file)
@@ -30,7 +30,7 @@ public class RemoteRpcProviderTest {
     static RemoteRpcProviderConfig moduleConfig;
 
     @BeforeClass
-    public static void setup() throws InterruptedException {
+    public static void setup() {
         moduleConfig = new RemoteRpcProviderConfig.Builder("odl-cluster-rpc")
                 .withConfigReader(ConfigFactory::load).build();
         final Config config = moduleConfig.get();
index 6735d37bdee5195e1ca9eb9b9e424ae9233d11a4..941ae2b330090b1cd49fffe45dd31c6495408058 100644 (file)
@@ -22,7 +22,7 @@ public class RpcErrorsExceptionTest {
     private RpcErrorsException exception;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         final RpcError rpcError = RpcResultBuilder.newError(
                 RpcError.ErrorType.RPC, "error", "error message");
         final RpcError rpcWarning = RpcResultBuilder.newWarning(
@@ -41,7 +41,7 @@ public class RpcErrorsExceptionTest {
     }
 
     @Test
-    public void testGetRpcErrors() throws Exception {
+    public void testGetRpcErrors() {
         final List<RpcError> actualErrors = (List<RpcError>) exception.getRpcErrors();
         Assert.assertEquals(rpcErrors.size(), actualErrors.size());
 
index 680d55da9d11bb0d97ca51bb5bb6224098ee20d1..ba6fc265ace828daf549c28482d8a6186c4a9596 100644 (file)
@@ -12,7 +12,6 @@ import akka.actor.ActorRef;
 import akka.actor.ActorSystem;
 import akka.testkit.javadsl.TestKit;
 import com.typesafe.config.ConfigFactory;
-import java.net.URISyntaxException;
 import java.util.Collections;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -34,7 +33,7 @@ public class RpcListenerTest {
 
 
     @BeforeClass
-    public static void setup() throws InterruptedException {
+    public static void setup() {
         system = ActorSystem.create("opendaylight-rpc", ConfigFactory.load().getConfig("odl-cluster-rpc"));
     }
 
@@ -45,7 +44,7 @@ public class RpcListenerTest {
     }
 
     @Test
-    public void testRouteAdd() throws URISyntaxException, InterruptedException {
+    public void testRouteAdd() {
         new TestKit(system) {
             {
                 // Test announcements
@@ -60,7 +59,7 @@ public class RpcListenerTest {
     }
 
     @Test
-    public void testRouteRemove() throws URISyntaxException, InterruptedException {
+    public void testRouteRemove() {
         new TestKit(system) {
             {
                 // Test announcements
index dd11dd7ff5adf7763f48c99b895f7ddd9d8f566c..83f7e154ab49b6b384ad4133cf9d99993a1237e9 100644 (file)
@@ -48,7 +48,7 @@ public class RpcRegistrarTest {
     private RpcRegistrar rpcRegistrar;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
         system = ActorSystem.create("test");
 
@@ -77,7 +77,7 @@ public class RpcRegistrarTest {
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system, true);
     }
 
@@ -95,7 +95,7 @@ public class RpcRegistrarTest {
     }
 
     @Test
-    public void testHandleReceiveAddEndpoint() throws Exception {
+    public void testHandleReceiveAddEndpoint() {
         final Map<Address, Optional<RemoteRpcEndpoint>> endpoints = ImmutableMap.of(
                 endpointAddress, Optional.of(firstEndpoint));
         testActorRef.tell(new UpdateRemoteEndpoints(endpoints), ActorRef.noSender());
@@ -106,7 +106,7 @@ public class RpcRegistrarTest {
     }
 
     @Test
-    public void testHandleReceiveRemoveEndpoint() throws Exception {
+    public void testHandleReceiveRemoveEndpoint() {
         final Map<Address, Optional<RemoteRpcEndpoint>> endpoints = ImmutableMap.of(
                 endpointAddress, Optional.empty());
         testActorRef.tell(new UpdateRemoteEndpoints(endpoints), ActorRef.noSender());
@@ -114,7 +114,7 @@ public class RpcRegistrarTest {
     }
 
     @Test
-    public void testHandleReceiveUpdateEndpoint() throws Exception {
+    public void testHandleReceiveUpdateEndpoint() {
         final InOrder inOrder = Mockito.inOrder(service, oldReg, newReg);
 
         testActorRef.tell(new UpdateRemoteEndpoints(ImmutableMap.of(endpointAddress, Optional.of(firstEndpoint))),
index d9c686c9abbede1493c9ce4dd6de601875defb06..7c34f2689b2b3230ba5a651536ee42b15e91a36b 100644 (file)
@@ -76,7 +76,7 @@ public class RpcRegistryTest {
     private int routeIdCounter = 1;
 
     @BeforeClass
-    public static void staticSetup() throws InterruptedException {
+    public static void staticSetup() {
         AkkaConfigurationReader reader = ConfigFactory::load;
 
         RemoteRpcProviderConfig config1 = new RemoteRpcProviderConfig.Builder("memberA").gossipTickInterval("200ms")
@@ -173,7 +173,7 @@ public class RpcRegistryTest {
      * deleted
      */
     @Test
-    public void testAddRemoveRpcOnSameNode() throws Exception {
+    public void testAddRemoveRpcOnSameNode() {
         LOG.info("testAddRemoveRpcOnSameNode starting");
 
         Address nodeAddress = node1.provider().getDefaultAddress();
@@ -210,7 +210,7 @@ public class RpcRegistryTest {
      * 1 node, ensure 2nd node gets updated
      */
     @Test
-    public void testRpcAddRemoveInCluster() throws Exception {
+    public void testRpcAddRemoveInCluster() {
 
         LOG.info("testRpcAddRemoveInCluster starting");
 
@@ -262,7 +262,7 @@ public class RpcRegistryTest {
      * Three node cluster. Register rpc on 2 nodes. Ensure 3rd gets updated.
      */
     @Test
-    public void testRpcAddedOnMultiNodes() throws Exception {
+    public void testRpcAddedOnMultiNodes() {
         final TestKit testKit = new TestKit(node3);
 
         // Add rpc on node 1
index b199ace2ea3297cd941617445989ecc363ec798f..6c826ac7bf036a592f7724b1f5b8ab0719d58d26 100644 (file)
@@ -41,7 +41,7 @@ public class GossiperTest {
     private Gossiper mockGossiper;
 
     @BeforeClass
-    public static void setup() throws InterruptedException {
+    public static void setup() {
         system = ActorSystem.create("opendaylight-rpc", ConfigFactory.load().getConfig("unit-test"));
         system.actorOf(Props.create(TerminationMonitor.class), "termination-monitor");
 
index dea930bf85ba145fad440b3ea663e0c1ca27fa3b..4210437a0bb468be83a12f427b8853d6d5c1bc79 100644 (file)
@@ -44,7 +44,7 @@ public class RemoteRpcRegistryMXBeanImplTest {
     private RemoteRpcRegistryMXBeanImpl mxBean;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         system = ActorSystem.create("test");
 
         final DOMRpcIdentifier emptyRpcIdentifier = DOMRpcIdentifier.create(
@@ -68,12 +68,12 @@ public class RemoteRpcRegistryMXBeanImplTest {
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system, Boolean.TRUE);
     }
 
     @Test
-    public void testGetGlobalRpcEmptyBuckets() throws Exception {
+    public void testGetGlobalRpcEmptyBuckets() {
         final Set<String> globalRpc = mxBean.getGlobalRpc();
 
         Assert.assertNotNull(globalRpc);
@@ -81,7 +81,7 @@ public class RemoteRpcRegistryMXBeanImplTest {
     }
 
     @Test
-    public void testGetGlobalRpc() throws Exception {
+    public void testGetGlobalRpc() {
         testActor.tell(new RpcRegistry.Messages.AddOrUpdateRoutes(Lists.newArrayList(buckets)), ActorRef.noSender());
         final Set<String> globalRpc = mxBean.getGlobalRpc();
 
@@ -93,7 +93,7 @@ public class RemoteRpcRegistryMXBeanImplTest {
     }
 
     @Test
-    public void testGetLocalRegisteredRoutedRpcEmptyBuckets() throws Exception {
+    public void testGetLocalRegisteredRoutedRpcEmptyBuckets() {
         final Set<String> localRegisteredRoutedRpc = mxBean.getLocalRegisteredRoutedRpc();
 
         Assert.assertNotNull(localRegisteredRoutedRpc);
@@ -101,7 +101,7 @@ public class RemoteRpcRegistryMXBeanImplTest {
     }
 
     @Test
-    public void testGetLocalRegisteredRoutedRpc() throws Exception {
+    public void testGetLocalRegisteredRoutedRpc() {
         testActor.tell(new RpcRegistry.Messages.AddOrUpdateRoutes(Lists.newArrayList(buckets)), ActorRef.noSender());
         final Set<String> localRegisteredRoutedRpc = mxBean.getLocalRegisteredRoutedRpc();
 
@@ -114,7 +114,7 @@ public class RemoteRpcRegistryMXBeanImplTest {
     }
 
     @Test
-    public void testFindRpcByNameEmptyBuckets() throws Exception {
+    public void testFindRpcByNameEmptyBuckets() {
         final Map<String, String> rpcByName = mxBean.findRpcByName("");
 
         Assert.assertNotNull(rpcByName);
@@ -122,7 +122,7 @@ public class RemoteRpcRegistryMXBeanImplTest {
     }
 
     @Test
-    public void testFindRpcByName() throws Exception {
+    public void testFindRpcByName() {
         testActor.tell(new RpcRegistry.Messages.AddOrUpdateRoutes(Lists.newArrayList(buckets)), ActorRef.noSender());
         final Map<String, String> rpcByName = mxBean.findRpcByName("");
 
@@ -132,7 +132,7 @@ public class RemoteRpcRegistryMXBeanImplTest {
     }
 
     @Test
-    public void testFindRpcByRouteEmptyBuckets() throws Exception {
+    public void testFindRpcByRouteEmptyBuckets() {
         final Map<String, String> rpcByRoute = mxBean.findRpcByRoute("");
 
         Assert.assertNotNull(rpcByRoute);
@@ -140,7 +140,7 @@ public class RemoteRpcRegistryMXBeanImplTest {
     }
 
     @Test
-    public void testFindRpcByRoute() throws Exception {
+    public void testFindRpcByRoute() {
         testActor.tell(new RpcRegistry.Messages.AddOrUpdateRoutes(Lists.newArrayList(buckets)), ActorRef.noSender());
         final Map<String, String> rpcByRoute = mxBean.findRpcByRoute("");
 
@@ -150,13 +150,13 @@ public class RemoteRpcRegistryMXBeanImplTest {
     }
 
     @Test
-    public void testGetBucketVersionsEmptyBuckets() throws Exception {
+    public void testGetBucketVersionsEmptyBuckets() {
         final String bucketVersions = mxBean.getBucketVersions();
         Assert.assertEquals(Collections.EMPTY_MAP.toString(), bucketVersions);
     }
 
     @Test
-    public void testGetBucketVersions() throws Exception {
+    public void testGetBucketVersions() {
         testActor.tell(new RpcRegistry.Messages.AddOrUpdateRoutes(Lists.newArrayList(buckets)), ActorRef.noSender());
         final String bucketVersions = mxBean.getBucketVersions();
 
index a0f2b0b50654c353d036cd022a0550b44f505da3..b8ddc3711e740882d7efff0d1393612a8fa3c890 100644 (file)
@@ -26,7 +26,7 @@ public class LatestEntryRoutingLogicTest {
     static ActorSystem system;
 
     @BeforeClass
-    public static void setup() throws InterruptedException {
+    public static void setup() {
         system = ActorSystem.create("opendaylight-rpc", ConfigFactory.load().getConfig("odl-cluster-rpc"));
     }
 
index 0c0a3b241089b8da2eb4110471fa5c13736f7bb2..4198441329ce5635c1a0b369215671c13c7c6d67 100644 (file)
@@ -681,7 +681,7 @@ public class MdsalLowLevelTestProvider implements OdlMdsalLowlevelControlService
 
         context.findLocalShardAsync(shardName).onComplete(new OnComplete<ActorRef>() {
             @Override
-            public void onComplete(final Throwable throwable, final ActorRef actorRef) throws Throwable {
+            public void onComplete(final Throwable throwable, final ActorRef actorRef) {
                 if (throwable != null) {
                     shutdownShardAsk.failure(throwable);
                 } else {
@@ -692,7 +692,7 @@ public class MdsalLowLevelTestProvider implements OdlMdsalLowlevelControlService
 
         shutdownShardAsk.future().onComplete(new OnComplete<Boolean>() {
             @Override
-            public void onComplete(final Throwable throwable, final Boolean gracefulStopResult) throws Throwable {
+            public void onComplete(final Throwable throwable, final Boolean gracefulStopResult) {
                 if (throwable != null) {
                     final RpcResult<T> failedResult = RpcResultBuilder.<T>failed()
                             .withError(ErrorType.APPLICATION, "Failed to gracefully shutdown shard", throwable).build();