Fixed few sonar warnings.
[controller.git] / opendaylight / config / config-manager / src / main / java / org / opendaylight / controller / config / manager / impl / TransactionStatus.java
index f86d6b1d818715481f601a4e366240aae2e5d4a5..af333c3893656da6f70b23f5258127950f691aa3 100644 (file)
@@ -48,32 +48,32 @@ public class TransactionStatus {
     }
 
     public synchronized void checkNotCommitStarted() {
-        if (secondPhaseCommitStarted == true) {
+        if (secondPhaseCommitStarted) {
             throw new IllegalStateException("Commit was triggered");
         }
     }
 
     public synchronized void checkCommitStarted() {
-        if (secondPhaseCommitStarted == false) {
+        if (!secondPhaseCommitStarted) {
             throw new IllegalStateException("Commit was not triggered");
         }
     }
 
     public synchronized void checkNotAborted() {
-        if (aborted == true) {
+        if (aborted) {
             throw new IllegalStateException("Configuration was aborted");
         }
     }
 
     public synchronized void checkNotCommitted() {
-        if (committed == true) {
+        if (committed) {
             throw new IllegalStateException(
                     "Cannot use this method after second phase commit");
         }
     }
 
     public synchronized void checkCommitted() {
-        if (committed == false) {
+        if (!committed) {
             throw new IllegalStateException(
                     "Cannot use this method before second phase commit");
         }