Checkstyle: fix ParenPad violations 96/51396/2
authorLorand Jakab <lojakab@cisco.com>
Fri, 3 Feb 2017 13:06:05 +0000 (15:06 +0200)
committerStephen Kitt <skitt@redhat.com>
Fri, 3 Feb 2017 13:50:54 +0000 (13:50 +0000)
Enforcing no space(s) after a left parenthesis and before a right
parenthesis is a proposed change [0] which can only be merged when all
violations are fixed in projects enforcing checkstyle. This patch fixes
those violations.

[0] https://git.opendaylight.org/gerrit/#/c/51316/

Change-Id: I70e3a8443a05615979fd149a9881bd6ca4b01125
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
16 files changed:
library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/StalePassiveConnectionService.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/ExceptionHandler.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcEndpoint.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionInstance.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionManager.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListener.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundMapper.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/BridgeUpdateCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/configuration/BridgeConfigReconciliationTask.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortUpdateCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/TransactionInvokerImpl.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/BridgeRemovedCommandTest.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/BridgeUpdateCommandTest.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/ControllerUpdateCommandTest.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OpenVSwitchUpdateCommandTest.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeUpdateCommandTest.java

index f3631fe8709635e85a5c3047c63e925b50c31215..42fba8f714961a95e181fff8d947912c0d1f9b35 100644 (file)
@@ -65,7 +65,7 @@ public class StalePassiveConnectionService implements AutoCloseable {
                     public void run() {
                         for (OvsdbClient client : clientFutureMap.keySet()) {
                             Future<?> clientFuture = clientFutureMap.get(client);
-                            if ( !clientFuture.isDone() && !clientFuture.isCancelled()) {
+                            if (!clientFuture.isDone() && !clientFuture.isCancelled()) {
                                 clientFuture.cancel(true);
                             }
                             if (client.isActive()) {
index 6cf9e0e33c56b8432c70cf2cea85f6639e0d3642..8ce4b6b62527797b1678cbbfbd37f08dba792f55 100644 (file)
@@ -41,7 +41,7 @@ public class ExceptionHandler extends ChannelDuplexHandler {
         Catch the IOException and close the channel. Similarly if the peer is
         powered off, Catch the read time out exception and close the channel
          */
-            if ((cause instanceof IOException ) || (cause instanceof ReadTimeoutException)) {
+            if ((cause instanceof IOException) || (cause instanceof ReadTimeoutException)) {
                 LOG.info("Closing channel to ovsdb {}", ctx.channel());
                 ctx.channel().close();
                 return;
index ad162a9e3d692a458205c1ef87bc970e9bc4a7de..579968b9c1d75203cacebc96027b6a3bfa9cd6ec 100644 (file)
@@ -127,8 +127,8 @@ public class JsonRpcEndpoint {
                     @Override
                     public void run() {
                         CallContext cc = methodContext.remove(request.getId());
-                        if ( cc != null) {
-                            if ( cc.getFuture().isDone() || cc.getFuture().isCancelled()) {
+                        if (cc != null) {
+                            if (cc.getFuture().isDone() || cc.getFuture().isCancelled()) {
                                 return;
                             }
                             cc.getFuture().cancel(false);
index 6e9665004e6947820f1374a3cbcab01e98282da5..203d09d9c7ee488f43a601090583bc480a8f9619 100644 (file)
@@ -128,7 +128,7 @@ public class OvsdbConnectionInstance {
 
     public void registerCallbacks(InstanceIdentifierCodec instanceIdentifierCodec) {
         if (this.callback == null) {
-            if (this.initialCreateData != null ) {
+            if (this.initialCreateData != null) {
                 this.updateConnectionAttributes(instanceIdentifierCodec);
             }
 
@@ -192,7 +192,7 @@ public class OvsdbConnectionInstance {
         LOG.debug("Update attributes of ovsdb node ip: {} port: {}",
                     this.initialCreateData.getConnectionInfo().getRemoteIp(),
                     this.initialCreateData.getConnectionInfo().getRemotePort());
-        for ( Map.Entry<DatabaseSchema,TransactInvoker> entry: transactInvokers.entrySet()) {
+        for (Map.Entry<DatabaseSchema,TransactInvoker> entry: transactInvokers.entrySet()) {
 
             TransactionBuilder transaction = new TransactionBuilder(this.client, entry.getKey());
 
@@ -359,7 +359,7 @@ public class OvsdbConnectionInstance {
         return this.connectedEntity;
     }
 
-    public void setConnectedEntity(Entity entity ) {
+    public void setConnectedEntity(Entity entity) {
         this.connectedEntity = entity;
     }
 
index 44b6b316ed997adb7d5cb875eb97457b741da826..f2c1dbe716bcbc3744c10a071090a234f68203b3 100644 (file)
@@ -493,7 +493,7 @@ public class OvsdbConnectionManager implements OvsdbConnectionListener, AutoClos
             operations.add(op.comment("Fetching Open_VSwitch table rows"));
             try {
                 List<OperationResult> results = connectionInstance.transact(dbSchema, operations).get();
-                if (results != null ) {
+                if (results != null) {
                     OperationResult selectResult = results.get(0);
                     openVSwitchRow = TyperUtils.getTypedRowWrapper(
                             dbSchema,OpenVSwitch.class,selectResult.getRows().get(0));
@@ -509,7 +509,7 @@ public class OvsdbConnectionManager implements OvsdbConnectionListener, AutoClos
 
     private Entity getEntityFromConnectionInstance(@Nonnull OvsdbConnectionInstance ovsdbConnectionInstance) {
         InstanceIdentifier<Node> iid = ovsdbConnectionInstance.getInstanceIdentifier();
-        if ( iid == null ) {
+        if (iid == null) {
             /* Switch initiated connection won't have iid, till it gets OpenVSwitch
              * table update but update callback is always registered after ownership
              * is granted. So we are explicitly fetch the row here to get the iid.
@@ -654,4 +654,4 @@ public class OvsdbConnectionManager implements OvsdbConnectionListener, AutoClos
         */
         ON_DISCONNECT
     }
-}
\ No newline at end of file
+}
index dfe6261c2280bc94670d1dd74838762922d9447b..3dd61c7043112dd00c138de708f54ff329e81101 100644 (file)
@@ -117,7 +117,7 @@ public class OvsdbDataTreeChangeListener implements ClusteredDataTreeChangeListe
                     OvsdbNodeAugmentation ovsdbNode = ovsdbNodeModification.getDataAfter();
                     ConnectionInfo key = ovsdbNode.getConnectionInfo();
                     InstanceIdentifier<Node> iid = cm.getInstanceIdentifier(key);
-                    if ( iid != null) {
+                    if (iid != null) {
                         LOG.warn("Connection to device {} already exists. Plugin does not allow multiple connections "
                                 + "to same device, hence dropping the request {}", key, ovsdbNode);
                     } else {
@@ -239,7 +239,7 @@ public class OvsdbDataTreeChangeListener implements ClusteredDataTreeChangeListe
                      * multi threaded and i don't see any need to further parallelism per DataChange
                      * notifications processing.
                      */
-                if ( cm.getHasDeviceOwnership(client.getMDConnectionInfo())) {
+                if (cm.getHasDeviceOwnership(client.getMDConnectionInfo())) {
                     LOG.debug("*This* instance of southbound plugin is an owner of the device {}", node);
                     result.computeIfAbsent(client, key -> new ArrayList<>()).add(change);
                 } else {
index bfc9d3d2e1705f6cc60a1356846cb028d323c409..27fa966d996473b98df1e8b80a4c44d07cce8e9d 100644 (file)
@@ -277,7 +277,7 @@ public class SouthboundMapper {
                 bridge, updatedControllerRows);
         final Set<UUID> controllerUuids = bridge.getControllerColumn().getData();
         final List<ControllerEntry> controllerEntries = new ArrayList<>();
-        for (UUID controllerUuid : controllerUuids ) {
+        for (UUID controllerUuid : controllerUuids) {
             final Controller controller = updatedControllerRows.get(controllerUuid);
             addControllerEntries(controllerEntries, controller);
         }
index d0948efba1510893d6f9cb380e21b986ece62401..748a47bf7308bf153801c8cab565c1b7aa648db8 100644 (file)
@@ -179,7 +179,7 @@ public class BridgeUpdateCommand implements TransactCommand {
     private void setFailMode(Bridge bridge,
             OvsdbBridgeAugmentation ovsdbManagedNode) {
         if (ovsdbManagedNode.getFailMode() != null
-                && SouthboundConstants.OVSDB_FAIL_MODE_MAP.get(ovsdbManagedNode.getFailMode()) != null ) {
+                && SouthboundConstants.OVSDB_FAIL_MODE_MAP.get(ovsdbManagedNode.getFailMode()) != null) {
             bridge.setFailMode(Sets.newHashSet(
                     SouthboundConstants.OVSDB_FAIL_MODE_MAP.get(ovsdbManagedNode.getFailMode())));
         }
@@ -197,4 +197,4 @@ public class BridgeUpdateCommand implements TransactCommand {
                 .build());
     }
 
-}
\ No newline at end of file
+}
index 3de6aa629ddbac389ed451f1dd4f13cb3078c883..e530b96e6fd9e5ddd1b89881c99c92f4f874ca27 100644 (file)
@@ -98,7 +98,7 @@ public class BridgeConfigReconciliationTask extends ReconciliationTask {
                                 tpChanges.add(node);
                             } else if (node.getKey().getNodeId().getValue().startsWith(
                                     nodeIid.firstKeyOf(Node.class).getNodeId().getValue())
-                                    && node.getTerminationPoint() != null && !node.getTerminationPoint().isEmpty() ) {
+                                    && node.getTerminationPoint() != null && !node.getTerminationPoint().isEmpty()) {
                                 tpChanges.add(node);
                             }
                         }
index 2dd687c3b9c5e24cea743dabad93361f4728d412..6510b2d3880cbcdbf796097ea3b1580bd09bef1a 100644 (file)
@@ -113,8 +113,8 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand {
     @Override
     public void execute(ReadWriteTransaction transaction) {
         final InstanceIdentifier<Node> connectionIId = getOvsdbConnectionInstance().getInstanceIdentifier();
-        if ( (portUpdatedRows == null && interfaceOldRows == null )
-                || ( interfaceOldRows.isEmpty() && portUpdatedRows.isEmpty())) {
+        if ((portUpdatedRows == null && interfaceOldRows == null)
+                || (interfaceOldRows.isEmpty() && portUpdatedRows.isEmpty())) {
             return;
         }
         Optional<Node> node = readNode(transaction, connectionIId);
@@ -129,7 +129,7 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand {
             portName = portUpdate.getValue().getNameColumn().getData();
             Optional<InstanceIdentifier<Node>> bridgeIid = getTerminationPointBridge(portUpdate.getKey());
             if (!bridgeIid.isPresent()) {
-                bridgeIid = getTerminationPointBridge( transaction, node, portName);
+                bridgeIid = getTerminationPointBridge(transaction, node, portName);
             }
             if (bridgeIid.isPresent()) {
                 NodeId bridgeId = SouthboundMapper.createManagedNodeId(bridgeIid.get());
@@ -161,7 +161,7 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand {
         for (Entry<UUID, Interface> interfaceUpdate : interfaceUpdatedRows.entrySet()) {
             String interfaceName = null;
             interfaceName = interfaceUpdatedRows.get(interfaceUpdate.getKey()).getNameColumn().getData();
-            Optional<InstanceIdentifier<Node>> bridgeIid = getTerminationPointBridge( transaction, node, interfaceName);
+            Optional<InstanceIdentifier<Node>> bridgeIid = getTerminationPointBridge(transaction, node, interfaceName);
             if (bridgeIid.isPresent()) {
                 TerminationPointKey tpKey = new TerminationPointKey(new TpId(interfaceName));
                 TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
@@ -236,7 +236,7 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand {
         OvsdbNodeAugmentation ovsdbNode = node.getAugmentation(OvsdbNodeAugmentation.class);
         List<ManagedNodeEntry> managedNodes = ovsdbNode.getManagedNodeEntry();
         TpId tpId = new TpId(tpName);
-        for ( ManagedNodeEntry managedNodeEntry : managedNodes ) {
+        for (ManagedNodeEntry managedNodeEntry : managedNodes) {
             Node managedNode = readNode(transaction,
                     (InstanceIdentifier<Node>)managedNodeEntry.getBridgeRef().getValue()).get();
             for (TerminationPoint tpEntry : managedNode.getTerminationPoint()) {
index 66b589efb68fe7cb4765fc602eec6caa844db104..75a46e1b6ac070076d8db89314c85bca400d3c39 100644 (file)
@@ -46,7 +46,7 @@ public class TransactionInvokerImpl implements TransactionInvoker,TransactionCha
     private Map<ReadWriteTransaction,TransactionCommand> transactionToCommand
         = new HashMap<>();
     private List<ReadWriteTransaction> pendingTransactions = new ArrayList<>();
-    private final AtomicBoolean runTask = new AtomicBoolean( true );
+    private final AtomicBoolean runTask = new AtomicBoolean(true);
 
     public TransactionInvokerImpl(DataBroker db) {
         this.db = db;
index a0c76535c777b57d1a0eb280bba18de6895d9dac..3ac2286152df4f935e99f7914ac92301fd0c59af 100644 (file)
@@ -51,7 +51,7 @@ public class BridgeRemovedCommandTest {
         when(TransactUtils.extractRemoved(changes, OvsdbBridgeAugmentation.class)).thenReturn(removed);
         when(TransactUtils.extractOriginal(changes, OvsdbBridgeAugmentation.class)).thenReturn(originals);
 
-        TransactionBuilder transaction = mock( TransactionBuilder.class, Mockito.RETURNS_MOCKS);
+        TransactionBuilder transaction = mock(TransactionBuilder.class, Mockito.RETURNS_MOCKS);
         briRemovedCmd.execute(transaction, mock(BridgeOperationalState.class), changes,
                 mock(InstanceIdentifierCodec.class));
 
index 629fe4b1e6685d3f2b77ae2a84cebc16ae6a7249..0c2181ef65ea1b72c82b1383ef0f2e3aed97cc05 100644 (file)
@@ -48,7 +48,7 @@ public class BridgeUpdateCommandTest {
         when(TransactUtils.extractCreated(changes, OvsdbBridgeAugmentation.class)).thenReturn(created);
         when(TransactUtils.extractUpdated(changes, OvsdbBridgeAugmentation.class)).thenReturn(updated);
 
-        TransactionBuilder transaction = mock( TransactionBuilder.class, Mockito.RETURNS_MOCKS);
+        TransactionBuilder transaction = mock(TransactionBuilder.class, Mockito.RETURNS_MOCKS);
         briUpdatedCmd.execute(transaction, mock(BridgeOperationalState.class), changes,
                 mock(InstanceIdentifierCodec.class));
 
index 13202f7a90a6680eb75ae08bcd61a8b76ce4923f..4fc3d6269d8aae0bf5a0a0143c6e77d856e96326 100644 (file)
@@ -48,7 +48,7 @@ public class ControllerUpdateCommandTest {
         when(TransactUtils.extractCreated(changes, ControllerEntry.class)).thenReturn(controllers);
         when(TransactUtils.extractUpdated(changes, OvsdbBridgeAugmentation.class)).thenReturn(bridges);
 
-        TransactionBuilder transaction = mock( TransactionBuilder.class, Mockito.RETURNS_MOCKS);
+        TransactionBuilder transaction = mock(TransactionBuilder.class, Mockito.RETURNS_MOCKS);
         contUpdateCmd.execute(transaction, mock(BridgeOperationalState.class), changes,
                 mock(InstanceIdentifierCodec.class));
 
index 23e60e36d71f7e223040879c0b14372577ff8f61..d51af5855ee55eab049bfc0380f206e3b6aa0ef9 100644 (file)
@@ -314,7 +314,7 @@ public class OpenVSwitchUpdateCommandTest {
         OpenVSwitch openVSwitch = mock(OpenVSwitch.class);
 
         Column<GenericTableSchema, Set<String>> column = mock(Column.class);
-        when(openVSwitch.getIfaceTypesColumn()).thenReturn(column );
+        when(openVSwitch.getIfaceTypesColumn()).thenReturn(column);
         Set<String> set = new HashSet<>();
         set.add("dpdk");
         set.add("dpdkr");
@@ -356,7 +356,7 @@ public class OpenVSwitchUpdateCommandTest {
     public void testSetDataPathTypes() throws Exception {
         OpenVSwitch openVSwitch = mock(OpenVSwitch.class);
         Column<GenericTableSchema, Set<String>> column = mock(Column.class);
-        when(openVSwitch.getDatapathTypesColumn()).thenReturn(column );
+        when(openVSwitch.getDatapathTypesColumn()).thenReturn(column);
         Set<String> set = new HashSet<>();
         set.add("netdev");
         set.add("system");
@@ -414,4 +414,4 @@ public class OpenVSwitchUpdateCommandTest {
         verify(ovsdbNodeBuilder).setDbVersion(anyString());
         verify(openVSwitch).getDbVersionColumn();
     }
-}
\ No newline at end of file
+}
index b13d188e85afd2941a676df01f4610d38970e1b6..2c9d421eb1006fae396c138379dc2d5de12628f8 100644 (file)
@@ -248,7 +248,7 @@ public class OvsdbBridgeUpdateCommandTest {
         when(ovsdbConnectionAugmentationBuilder.setManagedNodeEntry(any(List.class)))
                 .thenReturn(ovsdbConnectionAugmentationBuilder);
 
-        when(ovsdbConnectionAugmentationBuilder.build()).thenReturn(mock(OvsdbNodeAugmentation.class) );
+        when(ovsdbConnectionAugmentationBuilder.build()).thenReturn(mock(OvsdbNodeAugmentation.class));
         when(connectionNode.addAugmentation(eq(OvsdbNodeAugmentation.class), any(OvsdbNodeAugmentation.class)))
                 .thenReturn(connectionNode);