Fix checkstyle if-statements must use braces netconf 00/13500/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:28:38 +0000 (17:28 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:29:29 +0000 (17:29 -0500)
Change-Id: I2e5b8cc264acee74530ccbb990014b54649764b1
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/transactions/TransactionProvider.java
opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/ConfigPersisterNotificationHandler.java

index 2967cf04c49c12cadb327a14ce92bc447480a8d4..b2ee63a987836102fa31ae8c97e8dac899a33198 100644 (file)
@@ -77,8 +77,9 @@ public class TransactionProvider implements AutoCloseable {
     public synchronized ObjectName getOrCreateTransaction() {
         Optional<ObjectName> ta = getTransaction();
 
-        if (ta.isPresent())
+        if (ta.isPresent()) {
             return ta.get();
+        }
         transaction = configRegistryClient.beginConfig();
         allOpenedTransactions.add(transaction);
         return transaction;
index 7618807a0e2b23808cb93e73e99d190e93fdeca4..fe7b3da770fb0b6358f6895e1174c78236320248 100644 (file)
@@ -80,8 +80,9 @@ class ConfigPersisterNotificationListener implements NotificationListener {
 
     @Override
     public void handleNotification(final Notification notification, final Object handback) {
-        if (!(notification instanceof NetconfJMXNotification))
+        if (!(notification instanceof NetconfJMXNotification)) {
             return;
+        }
 
         // Socket should not be closed at this point
         // Activator unregisters this as JMX listener before close is called