diff --git a/conf/checkstyle/sun_checks.xml b/conf/checkstyle/sun_checks.xml
index db7e909..47121a6 100644
--- a/conf/checkstyle/sun_checks.xml
+++ b/conf/checkstyle/sun_checks.xml
@@ -219,10 +219,7 @@
           <property name="severity" value="warning"/>
         </module>
 
-        <module name="SimplifyBooleanExpression">
-          <property name="severity" value="warning"/>
-        </module>
-
+        <module name="SimplifyBooleanExpression"/>
         <module name="SimplifyBooleanReturn"/>
 
         <!-- Checks for class design                         -->
diff --git a/src/main/java/net/onrc/onos/apps/bgproute/Ptree.java b/src/main/java/net/onrc/onos/apps/bgproute/Ptree.java
index e370fdf..3c51c90 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/Ptree.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/Ptree.java
@@ -37,14 +37,14 @@
 
         while (node != null
                 && node.keyBits <= keyBits
-                && key_match(node.key, node.keyBits, key, keyBits) == true) {
+                && key_match(node.key, node.keyBits, key, keyBits)) {
             if (node.keyBits == keyBits) {
                 return addReference(node);
             }
 
             match = node;
 
-            if (bit_check(key, node.keyBits) == true) {
+            if (bit_check(key, node.keyBits)) {
                 node = node.right;
             } else {
                 node = node.left;
@@ -91,12 +91,12 @@
 
         while (node != null
                 && node.keyBits <= keyBits
-                && key_match(node.key, node.keyBits, key, keyBits) == true) {
+                && key_match(node.key, node.keyBits, key, keyBits)) {
             if (node.keyBits == keyBits) {
                 return addReference(node);
             }
 
-            if (bit_check(key, node.keyBits) == true) {
+            if (bit_check(key, node.keyBits)) {
                 node = node.right;
             } else {
                 node = node.left;
@@ -116,10 +116,10 @@
 
             while (node != null
                     && node.keyBits <= keyBits
-                    && key_match(node.key, node.keyBits, key, keyBits) == true) {
+                    && key_match(node.key, node.keyBits, key, keyBits)) {
                 matched = node;
 
-                if (bit_check(key, node.keyBits) == true) {
+                if (bit_check(key, node.keyBits)) {
                     node = node.right;
                 } else {
                     node = node.left;
@@ -230,7 +230,7 @@
     private void node_link(PtreeNode node, PtreeNode add) {
         boolean bit = bit_check(add.key, node.keyBits);
 
-        if (bit == true) {
+        if (bit) {
             node.right = add;
         } else {
             node.left = add;
diff --git a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
index 77703e5..08a68b6 100644
--- a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
+++ b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
@@ -386,7 +386,7 @@
                         }
                     }
 
-                    if (isflowEntryForThisSwitch == false) {
+                    if (!isflowEntryForThisSwitch) {
                         // If we don't find a flow entry for that switch, then we're
                         // in the middle of a rerouting (or something's gone wrong).
                         // This packet will be dropped as a victim of the rerouting.
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
index 56e4231..0bcb001 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
@@ -835,7 +835,7 @@
             }
 
             if (actionStripVlan != null) {
-                if (actionStripVlan.stripVlan() == true) {
+                if (actionStripVlan.stripVlan()) {
                     OFActionStripVirtualLan ofa = new OFActionStripVirtualLan();
                     openFlowActions.add(ofa);
                     actionsLen += ofa.getLength();
diff --git a/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java b/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java
index c12cf7e..a764f1c 100644
--- a/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java
+++ b/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java
@@ -378,7 +378,7 @@
      * @param npt
      */
     protected void addToQuarantineQueue(NodePortTuple npt) {
-        if (quarantineQueue.contains(npt) == false) {
+        if (!quarantineQueue.contains(npt)) {
             quarantineQueue.add(npt);
         }
     }
@@ -404,7 +404,7 @@
         // TODO We are not checking if the switch port tuple is already
         // in the maintenance list or not.  This will be an issue for
         // really large number of switch ports in the network.
-        if (maintenanceQueue.contains(npt) == false) {
+        if (!maintenanceQueue.contains(npt)) {
             maintenanceQueue.add(npt);
         }
     }
@@ -850,7 +850,7 @@
             }
         }
 
-        if (myLLDP == false) {
+        if (!myLLDP) {
             // This is not the LLDP sent by this controller.
             // If the LLDP message has multicast bit set, then we need to broadcast
             // the packet as a regular packet.
@@ -944,7 +944,7 @@
         // reverse link.
 
         newLinkInfo = links.get(lt);
-        if (newLinkInfo != null && isStandard && isReverse == false) {
+        if (newLinkInfo != null && isStandard && !isReverse) {
             Link reverseLink = new Link(lt.getDst(), lt.getDstPort(),
                     lt.getSrc(), lt.getSrcPort());
             LinkInfo reverseInfo = links.get(reverseLink);
@@ -998,7 +998,7 @@
             }
             // It could be a packet other than BSN LLDP, therefore
             // continue with the regular processing.
-            if (bsn.getPayload() instanceof LLDP == false) {
+            if (!(bsn.getPayload() instanceof LLDP)) {
                 return Command.CONTINUE;
             }
             return handleLldp((LLDP) bsn.getPayload(), sw, pi, false, cntx);
