From: David Date: Thu, 20 Apr 2017 22:42:07 +0000 (+0200) Subject: Fix checkstyle problems not detected by the current version X-Git-Tag: release/nitrogen~320 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=c11dae56ca449d754db98fb8de194594c84d1f24 Fix checkstyle problems not detected by the current version This change is required for overall move to new Checkstyle version, see https://git.opendaylight.org/gerrit/#/q/topic:bumpCheckstyle Most of the changes are redundant "final" modifiers. Change-Id: I637dd46617ca144f0ed33bd705c6357493b887fe Signed-off-by: David --- diff --git a/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/AbstractReadTransactionRequest.java b/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/AbstractReadTransactionRequest.java index 6510d5b5b4..c0d4714570 100644 --- a/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/AbstractReadTransactionRequest.java +++ b/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/AbstractReadTransactionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2016, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -63,5 +63,5 @@ public abstract class AbstractReadTransactionRequest externalizableProxy(final ABIVersion version); + protected abstract AbstractReadTransactionRequestProxyV1 externalizableProxy(ABIVersion version); } diff --git a/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/LocalHistoryRequest.java b/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/LocalHistoryRequest.java index 2955ed2b65..33d04850fb 100644 --- a/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/LocalHistoryRequest.java +++ b/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/LocalHistoryRequest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2016, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -42,5 +42,5 @@ public abstract class LocalHistoryRequest> exte } @Override - protected abstract AbstractLocalHistoryRequestProxy externalizableProxy(final ABIVersion version); + protected abstract AbstractLocalHistoryRequestProxy externalizableProxy(ABIVersion version); } diff --git a/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/TransactionRequest.java b/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/TransactionRequest.java index 7ae6b81e3b..4dcf6ea93c 100644 --- a/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/TransactionRequest.java +++ b/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/TransactionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2016, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -40,5 +40,5 @@ public abstract class TransactionRequest> extend } @Override - protected abstract AbstractTransactionRequestProxy externalizableProxy(final ABIVersion version); + protected abstract AbstractTransactionRequestProxy externalizableProxy(ABIVersion version); } diff --git a/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/concepts/Request.java b/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/concepts/Request.java index 75fbadd00a..5c8df78741 100644 --- a/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/concepts/Request.java +++ b/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/concepts/Request.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2016, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -56,7 +56,7 @@ public abstract class Request toRequestFailure(@Nonnull final RequestException cause); + public abstract RequestFailure toRequestFailure(@Nonnull RequestException cause); @Override protected ToStringHelper addToStringAttributes(final ToStringHelper toStringHelper) { diff --git a/opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/AbstractRequestSuccessTest.java b/opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/AbstractRequestSuccessTest.java index 34bd2cc348..8cafe9133a 100644 --- a/opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/AbstractRequestSuccessTest.java +++ b/opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/AbstractRequestSuccessTest.java @@ -38,5 +38,5 @@ public abstract class AbstractRequestSuccessTest> doAdditionalAssertions(deserialize); } - protected abstract void doAdditionalAssertions(final Object deserialize); + protected abstract void doAdditionalAssertions(Object deserialize); } diff --git a/opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/concepts/AbstractRequestTest.java b/opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/concepts/AbstractRequestTest.java index 31c19f4faa..d4378e9fd6 100644 --- a/opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/concepts/AbstractRequestTest.java +++ b/opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/concepts/AbstractRequestTest.java @@ -51,5 +51,5 @@ public abstract class AbstractRequestTest> { doAdditionalAssertions(deserialize); } - protected abstract void doAdditionalAssertions(final Object deserialize); + protected abstract void doAdditionalAssertions(Object deserialize); } diff --git a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ProgressTracker.java b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ProgressTracker.java index 25b7d7edc9..2a24077f6e 100644 --- a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ProgressTracker.java +++ b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ProgressTracker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2016, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -306,5 +306,5 @@ abstract class ProgressTracker { * @param now tick number corresponding to caller's present * @return delay (in ticks) after which another openTask() would be fair to be called by the same thread again */ - abstract long estimateIsolatedDelay(final long now); + abstract long estimateIsolatedDelay(long now); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardSnapshotCohort.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardSnapshotCohort.java index c8f62e2a12..455c874229 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardSnapshotCohort.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardSnapshotCohort.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. + * Copyright (c) 2015, 2017 Brocade Communications Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -98,7 +98,7 @@ class ShardSnapshotCohort implements RaftActorSnapshotCohort { @Override public State deserializeSnapshot(final ByteSource snapshotBytes) throws IOException { - try (final ObjectInputStream in = new ObjectInputStream(snapshotBytes.openStream())) { + try (ObjectInputStream in = new ObjectInputStream(snapshotBytes.openStream())) { return new ShardSnapshotState(ShardDataTreeSnapshot.deserialize(in)); } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModification.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModification.java index 02b8047b44..c81468d661 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModification.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModification.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2014, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -8,7 +8,6 @@ package org.opendaylight.controller.cluster.datastore.modification; - import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; /** diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/policy/TestOnlyRaftPolicy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/policy/TestOnlyRaftPolicy.java index 83f9d3d277..1f786137f7 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/policy/TestOnlyRaftPolicy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/policy/TestOnlyRaftPolicy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2015, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -8,7 +8,6 @@ package org.opendaylight.controller.cluster.datastore.policy; - import org.opendaylight.controller.cluster.raft.policy.RaftPolicy; /** diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java index 506498ce9a..424439f6e5 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2016, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -402,7 +402,7 @@ public class DistributedShardedDOMDataTree implements DOMDataTreeService, DOMDat prefix.getDatastoreType().equals(org.opendaylight.mdsal.common.api.LogicalDatastoreType.CONFIGURATION) ? distributedConfigDatastore : distributedOperDatastore; - try (final DOMDataTreeProducer producer = localCreateProducer(Collections.singletonList(prefix))) { + try (DOMDataTreeProducer producer = localCreateProducer(Collections.singletonList(prefix))) { final Entry entry = createDatastoreClient(shardName, distributedDataStore.getActorContext()); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ClientBackedDataStoreTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ClientBackedDataStoreTest.java index bf10751480..d7d774d699 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ClientBackedDataStoreTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ClientBackedDataStoreTest.java @@ -78,7 +78,7 @@ public class ClientBackedDataStoreTest { @Test public void testCreateTransactionChain() throws Exception { - try (final ClientBackedDataStore clientBackedDataStore = new ClientBackedDataStore( + try (ClientBackedDataStore clientBackedDataStore = new ClientBackedDataStore( actorContext, UNKNOWN_ID, clientActor)) { final DOMStoreTransactionChain txChain = clientBackedDataStore.createTransactionChain(); Assert.assertNotNull(txChain); @@ -88,7 +88,7 @@ public class ClientBackedDataStoreTest { @Test public void testNewReadOnlyTransaction() throws Exception { - try (final ClientBackedDataStore clientBackedDataStore = new ClientBackedDataStore( + try (ClientBackedDataStore clientBackedDataStore = new ClientBackedDataStore( actorContext, UNKNOWN_ID, clientActor)) { final DOMStoreReadTransaction tx = clientBackedDataStore.newReadOnlyTransaction(); Assert.assertNotNull(tx); @@ -98,7 +98,7 @@ public class ClientBackedDataStoreTest { @Test public void testNewWriteOnlyTransaction() throws Exception { - try (final ClientBackedDataStore clientBackedDataStore = new ClientBackedDataStore( + try (ClientBackedDataStore clientBackedDataStore = new ClientBackedDataStore( actorContext, UNKNOWN_ID, clientActor)) { final DOMStoreWriteTransaction tx = clientBackedDataStore.newWriteOnlyTransaction(); Assert.assertNotNull(tx); @@ -108,11 +108,11 @@ public class ClientBackedDataStoreTest { @Test public void testNewReadWriteTransaction() throws Exception { - try (final ClientBackedDataStore clientBackedDataStore = new ClientBackedDataStore( + try (ClientBackedDataStore clientBackedDataStore = new ClientBackedDataStore( actorContext, UNKNOWN_ID, clientActor)) { final DOMStoreReadWriteTransaction tx = clientBackedDataStore.newReadWriteTransaction(); Assert.assertNotNull(tx); Mockito.verify(clientActor, Mockito.times(1)).createTransaction(); } } -} \ No newline at end of file +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreIntegrationTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreIntegrationTest.java index e3aae92f9c..2cd2b29c8d 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreIntegrationTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreIntegrationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2014, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -139,7 +139,7 @@ public class DistributedDataStoreIntegrationTest { public void testWriteTransactionWithSingleShard() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "transactionIntegrationTest", "test-1")) { testWriteTransaction(dataStore, TestModel.TEST_PATH, @@ -156,7 +156,7 @@ public class DistributedDataStoreIntegrationTest { public void testWriteTransactionWithMultipleShards() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "testWriteTransactionWithMultipleShards", "cars-1", "people-1")) { DOMStoreWriteTransaction writeTx = dataStore.newWriteOnlyTransaction(); @@ -205,7 +205,7 @@ public class DistributedDataStoreIntegrationTest { public void testReadWriteTransactionWithSingleShard() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "testReadWriteTransactionWithSingleShard", "test-1")) { // 1. Create a read-write Tx @@ -246,7 +246,7 @@ public class DistributedDataStoreIntegrationTest { public void testReadWriteTransactionWithMultipleShards() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "testReadWriteTransactionWithMultipleShards", "cars-1", "people-1")) { DOMStoreReadWriteTransaction readWriteTx = dataStore.newReadWriteTransaction(); @@ -303,7 +303,7 @@ public class DistributedDataStoreIntegrationTest { public void testSingleTransactionsWritesInQuickSuccession() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "testSingleTransactionsWritesInQuickSuccession", "cars-1")) { final DOMStoreTransactionChain txChain = dataStore.createTransactionChain(); @@ -346,7 +346,7 @@ public class DistributedDataStoreIntegrationTest { final CountDownLatch blockRecoveryLatch = new CountDownLatch(1); InMemoryJournal.addBlockReadMessagesLatch(persistentID, blockRecoveryLatch); - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, testName, false, shardName)) { // Create the write Tx @@ -446,7 +446,7 @@ public class DistributedDataStoreIntegrationTest { final CountDownLatch blockRecoveryLatch = new CountDownLatch(1); InMemoryJournal.addBlockReadMessagesLatch(persistentID, blockRecoveryLatch); - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, testName, false, shardName)) { // Create the read-write Tx @@ -590,7 +590,7 @@ public class DistributedDataStoreIntegrationTest { InMemoryJournal.addEntry(persistentID, 1, "Dummy data so akka will read from persistence"); - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, testName, false, shardName)) { // Create the read-write Tx @@ -660,7 +660,7 @@ public class DistributedDataStoreIntegrationTest { datastoreContextBuilder.shardHeartbeatIntervalInMillis(100).shardElectionTimeoutFactor(1) .shardInitializationTimeout(200, TimeUnit.MILLISECONDS); - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, testName, false, shardName)) { final Object result = dataStore.getActorContext().executeOperation( @@ -668,7 +668,7 @@ public class DistributedDataStoreIntegrationTest { assertTrue("Expected LocalShardFound. Actual: " + result, result instanceof LocalShardFound); // Create the write Tx. - try (final DOMStoreWriteTransaction writeTx = writeOnly ? dataStore.newWriteOnlyTransaction() + try (DOMStoreWriteTransaction writeTx = writeOnly ? dataStore.newWriteOnlyTransaction() : dataStore.newReadWriteTransaction()) { assertNotNull("newReadWriteTransaction returned null", writeTx); @@ -731,7 +731,7 @@ public class DistributedDataStoreIntegrationTest { public void testTransactionAbort() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "transactionAbortIntegrationTest", "test-1")) { final DOMStoreWriteTransaction writeTx = dataStore.newWriteOnlyTransaction(); @@ -757,7 +757,7 @@ public class DistributedDataStoreIntegrationTest { public void testTransactionChainWithSingleShard() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "testTransactionChainWithSingleShard", "test-1")) { // 1. Create a Tx chain and write-only Tx @@ -841,7 +841,7 @@ public class DistributedDataStoreIntegrationTest { public void testTransactionChainWithMultipleShards() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "testTransactionChainWithMultipleShards", "cars-1", "people-1")) { final DOMStoreTransactionChain txChain = dataStore.createTransactionChain(); @@ -909,7 +909,7 @@ public class DistributedDataStoreIntegrationTest { public void testCreateChainedTransactionsInQuickSuccession() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "testCreateChainedTransactionsInQuickSuccession", "cars-1")) { final ConcurrentDOMDataBroker broker = new ConcurrentDOMDataBroker( @@ -958,7 +958,7 @@ public class DistributedDataStoreIntegrationTest { public void testCreateChainedTransactionAfterEmptyTxReadied() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "testCreateChainedTransactionAfterEmptyTxReadied", "test-1")) { final DOMStoreTransactionChain txChain = dataStore.createTransactionChain(); @@ -983,7 +983,7 @@ public class DistributedDataStoreIntegrationTest { public void testCreateChainedTransactionWhenPreviousNotReady() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "testCreateChainedTransactionWhenPreviousNotReady", "test-1")) { final DOMStoreTransactionChain txChain = dataStore.createTransactionChain(); @@ -1024,7 +1024,7 @@ public class DistributedDataStoreIntegrationTest { public void testChainWithReadOnlyTxAfterPreviousReady() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "testChainWithReadOnlyTxAfterPreviousReady", "test-1")) { final DOMStoreTransactionChain txChain = dataStore.createTransactionChain(); @@ -1068,7 +1068,7 @@ public class DistributedDataStoreIntegrationTest { public void testChainedTransactionFailureWithSingleShard() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "testChainedTransactionFailureWithSingleShard", "cars-1")) { final ConcurrentDOMDataBroker broker = new ConcurrentDOMDataBroker( @@ -1111,7 +1111,7 @@ public class DistributedDataStoreIntegrationTest { public void testChainedTransactionFailureWithMultipleShards() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "testChainedTransactionFailureWithMultipleShards", "cars-1", "people-1")) { final ConcurrentDOMDataBroker broker = new ConcurrentDOMDataBroker( @@ -1157,7 +1157,7 @@ public class DistributedDataStoreIntegrationTest { public void testChangeListenerRegistration() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "testChangeListenerRegistration", "test-1")) { testWriteTransaction(dataStore, TestModel.TEST_PATH, @@ -1210,7 +1210,7 @@ public class DistributedDataStoreIntegrationTest { public void testDataTreeChangeListenerRegistration() throws Exception { new IntegrationTestKit(getSystem(), datastoreContextBuilder) { { - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, "testDataTreeChangeListenerRegistration", "test-1")) { testWriteTransaction(dataStore, TestModel.TEST_PATH, @@ -1294,7 +1294,7 @@ public class DistributedDataStoreIntegrationTest { new DatastoreSnapshot.ShardSnapshot("cars", carsSnapshot), new DatastoreSnapshot.ShardSnapshot("people", peopleSnapshot))); - try (final AbstractDataStore dataStore = setupAbstractDataStore( + try (AbstractDataStore dataStore = setupAbstractDataStore( testParameter, name, "module-shards-member1.conf", true, "cars", "people")) { final DOMStoreReadTransaction readTx = dataStore.newReadOnlyTransaction(); @@ -1330,7 +1330,7 @@ public class DistributedDataStoreIntegrationTest { MetadataShardDataTreeSnapshot shardSnapshot = new MetadataShardDataTreeSnapshot(root); final ByteArrayOutputStream bos = new ByteArrayOutputStream(); - try (final DataOutputStream dos = new DataOutputStream(bos)) { + try (DataOutputStream dos = new DataOutputStream(bos)) { PayloadVersion.BORON.writeTo(dos); try (ObjectOutputStream oos = new ObjectOutputStream(dos)) { oos.writeObject(shardSnapshot); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java index 9b97ee783c..1d4d66e570 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. + * Copyright (c) 2015, 2017 Brocade Communications Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -605,7 +605,7 @@ public class DistributedDataStoreRemotingIntegrationTest extends AbstractTest { .shardHeartbeatIntervalInMillis(100).shardElectionTimeoutFactor(5); IntegrationTestKit newMember1TestKit = new IntegrationTestKit(leaderSystem, newMember1Builder, commitTimeout); - try (final AbstractDataStore ds = + try (AbstractDataStore ds = newMember1TestKit.setupAbstractDataStore( testParameter, testName, MODULE_SHARDS_CARS_ONLY_1_2, false, CARS)) { @@ -881,7 +881,7 @@ public class DistributedDataStoreRemotingIntegrationTest extends AbstractTest { final IntegrationTestKit follower2TestKit = new IntegrationTestKit(follower2System, DatastoreContext.newBuilderFrom(followerDatastoreContextBuilder.build()).operationTimeoutInMillis(100), commitTimeout); - try (final AbstractDataStore follower2DistributedDataStore = follower2TestKit.setupAbstractDataStore( + try (AbstractDataStore follower2DistributedDataStore = follower2TestKit.setupAbstractDataStore( testParameter, testName, MODULE_SHARDS_CARS_PEOPLE_1_2_3, false)) { // Create and submit a couple tx's so they're pending. @@ -1061,7 +1061,7 @@ public class DistributedDataStoreRemotingIntegrationTest extends AbstractTest { final IntegrationTestKit follower2TestKit = new IntegrationTestKit( follower2System, follower2DatastoreContextBuilder, commitTimeout); - try (final AbstractDataStore ds = + try (AbstractDataStore ds = follower2TestKit.setupAbstractDataStore( testParameter, testName, MODULE_SHARDS_CARS_PEOPLE_1_2_3, false, CARS)) { diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/actors/ShardSnapshotActorTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/actors/ShardSnapshotActorTest.java index ae9499744f..f3660da646 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/actors/ShardSnapshotActorTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/actors/ShardSnapshotActorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2016, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -49,7 +49,7 @@ public class ShardSnapshotActorTest extends AbstractActorTest { if (installSnapshotStream != null) { final ShardDataTreeSnapshot deserialized; - try (final ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream( + try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream( installSnapshotStream.toByteArray()))) { deserialized = ShardDataTreeSnapshot.deserialize(in); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DatastoreSnapshotListTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DatastoreSnapshotListTest.java index f344815a87..7ae0b1c498 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DatastoreSnapshotListTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DatastoreSnapshotListTest.java @@ -146,7 +146,7 @@ public class DatastoreSnapshotListTest { final ByteArrayOutputStream bos = new ByteArrayOutputStream(); if (root != null) { MetadataShardDataTreeSnapshot snapshot = new MetadataShardDataTreeSnapshot(root); - try (final DataOutputStream dos = new DataOutputStream(bos)) { + try (DataOutputStream dos = new DataOutputStream(bos)) { PayloadVersion.BORON.writeTo(dos); try (ObjectOutputStream oos = new ObjectOutputStream(dos)) { oos.writeObject(snapshot); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/ShardDataTreeSnapshotTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/ShardDataTreeSnapshotTest.java index d999620180..1912c21db5 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/ShardDataTreeSnapshotTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/ShardDataTreeSnapshotTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved. + * Copyright (c) 2016, 2017 Brocade Communications Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -43,12 +43,12 @@ public class ShardDataTreeSnapshotTest { MetadataShardDataTreeSnapshot snapshot = new MetadataShardDataTreeSnapshot(expectedNode); ByteArrayOutputStream bos = new ByteArrayOutputStream(); - try (final ObjectOutputStream out = new ObjectOutputStream(bos)) { + try (ObjectOutputStream out = new ObjectOutputStream(bos)) { snapshot.serialize(out); } ShardDataTreeSnapshot deserialized; - try (final ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()))) { + try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()))) { deserialized = ShardDataTreeSnapshot.deserialize(in); } @@ -69,12 +69,12 @@ public class ShardDataTreeSnapshotTest { ImmutableMap.of(TestShardDataTreeSnapshotMetadata.class, new TestShardDataTreeSnapshotMetadata("test")); MetadataShardDataTreeSnapshot snapshot = new MetadataShardDataTreeSnapshot(expectedNode, expMetadata); ByteArrayOutputStream bos = new ByteArrayOutputStream(); - try (final ObjectOutputStream out = new ObjectOutputStream(bos)) { + try (ObjectOutputStream out = new ObjectOutputStream(bos)) { snapshot.serialize(out); } ShardDataTreeSnapshot deserialized; - try (final ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()))) { + try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()))) { deserialized = ShardDataTreeSnapshot.deserialize(in); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/sharding/DistributedShardFrontendTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/sharding/DistributedShardFrontendTest.java index 53840049b4..b710958084 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/sharding/DistributedShardFrontendTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/sharding/DistributedShardFrontendTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2016, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -116,7 +116,7 @@ public class DistributedShardFrontendTest { final DistributedShardFrontend rootShard = new DistributedShardFrontend(distributedDataStore, client, ROOT); - try (final DOMDataTreeProducer producer = shardedDOMDataTree.createProducer(Collections.singletonList(ROOT))) { + try (DOMDataTreeProducer producer = shardedDOMDataTree.createProducer(Collections.singletonList(ROOT))) { shardedDOMDataTree.registerDataTreeShard(ROOT, rootShard, producer); } @@ -142,7 +142,7 @@ public class DistributedShardFrontendTest { final DistributedShardFrontend outerListShard = new DistributedShardFrontend( distributedDataStore, outerListClient, OUTER_LIST_ID); - try (final DOMDataTreeProducer producer = + try (DOMDataTreeProducer producer = shardedDOMDataTree.createProducer(Collections.singletonList(OUTER_LIST_ID))) { shardedDOMDataTree.registerDataTreeShard(OUTER_LIST_ID, outerListShard, producer); } @@ -213,6 +213,4 @@ public class DistributedShardFrontendTest { return testContainer; } - - -} \ No newline at end of file +} diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/ExecuteRpc.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/ExecuteRpc.java index 4824cd71cc..7d647cff8c 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/ExecuteRpc.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/ExecuteRpc.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2014, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -7,7 +7,6 @@ */ package org.opendaylight.controller.remote.rpc.messages; - import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/gossip/BucketStoreActor.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/gossip/BucketStoreActor.java index f627138c67..02e8770337 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/gossip/BucketStoreActor.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/gossip/BucketStoreActor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2014, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -230,14 +230,14 @@ public abstract class BucketStoreActor> extends * @param address Remote address * @param bucket Bucket removed */ - protected abstract void onBucketRemoved(final Address address, final Bucket bucket); + protected abstract void onBucketRemoved(Address address, Bucket bucket); /** * Callback to subclasses invoked when the set of remote buckets is updated. * * @param newBuckets Map of address to new bucket. Never null, but can be empty. */ - protected abstract void onBucketsUpdated(final Map> newBuckets); + protected abstract void onBucketsUpdated(Map> newBuckets); /** * Helper to collect all known buckets. diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteRpcRegistryMXBean.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteRpcRegistryMXBean.java index ea54e67b06..47903bb114 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteRpcRegistryMXBean.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteRpcRegistryMXBean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2015, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -8,7 +8,6 @@ package org.opendaylight.controller.remote.rpc.registry.mbeans; - import java.util.Map; import java.util.Set; diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteRpcProviderTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteRpcProviderTest.java index 45fc9ffbbc..a5158bc94d 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteRpcProviderTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteRpcProviderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2014, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -46,7 +46,7 @@ public class RemoteRpcProviderTest { @Test public void testRemoteRpcProvider() throws Exception { - try (final RemoteRpcProvider rpcProvider = new RemoteRpcProvider(system, mock(DOMRpcProviderService.class), + try (RemoteRpcProvider rpcProvider = new RemoteRpcProvider(system, mock(DOMRpcProviderService.class), mock(DOMRpcService.class), new RemoteRpcProviderConfig(system.settings().config()))) { rpcProvider.start(); diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RpcBrokerTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RpcBrokerTest.java index 4fb0083863..02d46319e9 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RpcBrokerTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RpcBrokerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2014, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -8,7 +8,6 @@ package org.opendaylight.controller.remote.rpc; - import static org.junit.Assert.assertEquals; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.when; diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RpcListenerTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RpcListenerTest.java index 37d81c7afb..fa64bbd15b 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RpcListenerTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RpcListenerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2014, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -8,7 +8,6 @@ package org.opendaylight.controller.remote.rpc; - import akka.actor.ActorRef; import akka.actor.ActorSystem; import akka.testkit.JavaTestKit;