Madan Jampani

ONOS-2157: Fix NPE in Transaction execution logic

Change-Id: I55a73a82d5ba95407c451a7dd95832442625b994
...@@ -312,7 +312,7 @@ public class PartitionedDatabase implements Database { ...@@ -312,7 +312,7 @@ public class PartitionedDatabase implements Database {
312 subTransactions.entrySet().iterator().next(); 312 subTransactions.entrySet().iterator().next();
313 return entry.getKey().prepareAndCommit(entry.getValue()); 313 return entry.getKey().prepareAndCommit(entry.getValue());
314 } else { 314 } else {
315 - if (transactionManager != null) { 315 + if (transactionManager == null) {
316 throw new IllegalStateException("TransactionManager is not initialized"); 316 throw new IllegalStateException("TransactionManager is not initialized");
317 } 317 }
318 return transactionManager.execute(transaction); 318 return transactionManager.execute(transaction);
......