Fail build on checkstyle errors
[ovsdb.git] / southbound / southbound-impl / src / main / java / org / opendaylight / ovsdb / southbound / SouthboundProvider.java
index 9d9ea1d58ee9cfb4b2c9e866116778efa47f7dbf..f9936c9f35c3eea4c8074d329b3771837caede1e 100644 (file)
@@ -73,7 +73,7 @@ public class SouthboundProvider implements BindingAwareProvider, AutoCloseable {
         initializeTopology(transaction,type);
         CheckedFuture<Optional<Topology>, ReadFailedException> ovsdbTp = transaction.read(type, path);
         try {
-            if(!ovsdbTp.get().isPresent()) {
+            if (!ovsdbTp.get().isPresent()) {
                 TopologyBuilder tpb = new TopologyBuilder();
                 tpb.setTopologyId(SouthboundConstants.OVSDB_TOPOLOGY_ID);
                 transaction.put(type, path, tpb.build());
@@ -86,17 +86,16 @@ public class SouthboundProvider implements BindingAwareProvider, AutoCloseable {
         }
     }
 
-    private void initializeTopology(ReadWriteTransaction t, LogicalDatastoreType type) {
-        InstanceIdentifier<NetworkTopology> path = InstanceIdentifier
-                .create(NetworkTopology.class);
-       CheckedFuture<Optional<NetworkTopology>, ReadFailedException> tp = t.read(type,path);
-       try {
-           if(!tp.get().isPresent()) {
-               NetworkTopologyBuilder ntb = new NetworkTopologyBuilder();
-               t.put(type,path,ntb.build());
-           }
-       } catch (Exception e) {
-           LOG.error("Error initializing ovsdb topology {}",e);
-       }
+    private void initializeTopology(ReadWriteTransaction transaction, LogicalDatastoreType type) {
+        InstanceIdentifier<NetworkTopology> path = InstanceIdentifier.create(NetworkTopology.class);
+        CheckedFuture<Optional<NetworkTopology>, ReadFailedException> topology = transaction.read(type,path);
+        try {
+            if (!topology.get().isPresent()) {
+                NetworkTopologyBuilder ntb = new NetworkTopologyBuilder();
+                transaction.put(type,path,ntb.build());
+            }
+        } catch (Exception e) {
+            LOG.error("Error initializing ovsdb topology {}",e);
+        }
     }
 }