diff --git a/pom.xml b/pom.xml
index 472f644..0274bb8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -97,6 +97,7 @@
           <compilerArgs>
             <arg>-Xlint:all</arg>
             <arg>-Xlint:-serial</arg>
+            <arg>-Werror</arg>
           </compilerArgs>
         </configuration>
         <executions>
diff --git a/src/main/java/net/floodlightcontroller/core/internal/Controller.java b/src/main/java/net/floodlightcontroller/core/internal/Controller.java
index eb78c97..b464dbc 100644
--- a/src/main/java/net/floodlightcontroller/core/internal/Controller.java
+++ b/src/main/java/net/floodlightcontroller/core/internal/Controller.java
@@ -512,13 +512,15 @@
                         " during handshake {exception}",
                 explanation = "Could not process the switch description string",
                 recommendation = LogMessageDoc.CHECK_SWITCH)
+        @SuppressWarnings("unchecked")
         void processSwitchDescReply() {
             try {
                 // Read description, if it has been updated
-                @SuppressWarnings("unchecked")
-                Future<List<OFStatistics>> desc_future =
-                        (Future<List<OFStatistics>>) sw.
+                Future<?> future =
+                        (Future<?>) sw.
                                 getAttribute(IOFSwitch.SWITCH_DESCRIPTION_FUTURE);
+                Future<List<OFStatistics>> desc_future =
+                        (Future<List<OFStatistics>>) future;
                 List<OFStatistics> values =
                         desc_future.get(0, TimeUnit.MILLISECONDS);
                 if (values != null) {
@@ -601,11 +603,11 @@
 
                 synchronized (roleChanger) {
                     // We need to keep track of all of the switches that are connected
-                    // to the controller, in any role, so that we can later send the 
+                    // to the controller, in any role, so that we can later send the
                     // role request messages when the controller role changes.
-                    // We need to be synchronized while doing this: we must not 
+                    // We need to be synchronized while doing this: we must not
                     // send a another role request to the connectedSwitches until
-                    // we were able to add this new switch to connectedSwitches 
+                    // we were able to add this new switch to connectedSwitches
                     // *and* send the current role to the new switch.
                     connectedSwitches.add(sw);
 
@@ -631,11 +633,11 @@
                         // This is a probe that we'll use to determine if the switch
                         // actually supports the role request message. If it does we'll
                         // get back a role reply message. If it doesn't we'll get back an
-                        // OFError message. 
+                        // OFError message.
                         // If role is MASTER we will promote switch to active
                         // list when we receive the switch's role reply messages
                         /*
-                        log.debug("This controller's role is {}, " + 
+                        log.debug("This controller's role is {}, " +
                                 "sending initial role request msg to {}",
                                 role, sw);
                         Collection<OFSwitchImpl> swList = new ArrayList<OFSwitchImpl>(1);
@@ -644,7 +646,7 @@
                         */
                     } else {
                         // Role supported not enabled on controller (for now)
-                        // automatically promote switch to active state. 
+                        // automatically promote switch to active state.
                         log.debug("This controller's role is {}, " +
                                 "not sending role request msg to {}",
                                 role, sw);
@@ -671,15 +673,15 @@
         }
 
         /* Handle a role reply message we received from the switch. Since
-         * netty serializes message dispatch we don't need to synchronize 
+         * netty serializes message dispatch we don't need to synchronize
          * against other receive operations from the same switch, so no need
          * to synchronize addSwitch(), removeSwitch() operations from the same
-         * connection. 
+         * connection.
          * FIXME: However, when a switch with the same DPID connects we do
          * need some synchronization. However, handling switches with same
          * DPID needs to be revisited anyways (get rid of r/w-lock and synchronous
          * removedSwitch notification):1
-         * 
+         *
          */
         @LogMessageDoc(level = "ERROR",
                 message = "Invalid role value in role reply message",
@@ -722,22 +724,22 @@
                         getAlwaysClearFlowsOnSwAdd()) {
                     // This is the first role-reply message we receive from
                     // this switch or roles were disabled when the switch
-                    // connected: 
-                    // Delete all pre-existing flows for new connections to 
+                    // connected:
+                    // Delete all pre-existing flows for new connections to
                     // the master
                     //
-                    // FIXME: Need to think more about what the test should 
-                    // be for when we flush the flow-table? For example, 
-                    // if all the controllers are temporarily in the backup 
-                    // role (e.g. right after a failure of the master 
-                    // controller) at the point the switch connects, then 
-                    // all of the controllers will initially connect as 
-                    // backup controllers and not flush the flow-table. 
+                    // FIXME: Need to think more about what the test should
+                    // be for when we flush the flow-table? For example,
+                    // if all the controllers are temporarily in the backup
+                    // role (e.g. right after a failure of the master
+                    // controller) at the point the switch connects, then
+                    // all of the controllers will initially connect as
+                    // backup controllers and not flush the flow-table.
                     // Then when one of them is promoted to master following
                     // the master controller election the flow-table
-                    // will still not be flushed because that's treated as 
-                    // a failover event where we don't want to flush the 
-                    // flow-table. The end result would be that the flow 
+                    // will still not be flushed because that's treated as
+                    // a failover event where we don't want to flush the
+                    // flow-table. The end result would be that the flow
                     // table for a newly connected switch is never
                     // flushed. Not sure how to handle that case though...
                     sw.clearAllFlowMods();
@@ -748,27 +750,27 @@
 
                 // Some switches don't seem to update us with port
                 // status messages while in slave role.
-                //readSwitchPortStateFromStorage(sw);                
+                //readSwitchPortStateFromStorage(sw);
 
-                // Only add the switch to the active switch list if 
-                // we're not in the slave role. Note that if the role 
-                // attribute is null, then that means that the switch 
+                // Only add the switch to the active switch list if
+                // we're not in the slave role. Note that if the role
+                // attribute is null, then that means that the switch
                 // doesn't support the role request messages, so in that
-                // case we're effectively in the EQUAL role and the 
+                // case we're effectively in the EQUAL role and the
                 // switch should be included in the active switch list.
                 addSwitch(sw);
                 log.debug("Added master switch {} to active switch list",
                         HexString.toHexString(sw.getId()));
 
             } else if (isActive && !sw.isActive()) {
-                // Transition from MASTER to SLAVE: remove switch 
-                // from active switch list. 
+                // Transition from MASTER to SLAVE: remove switch
+                // from active switch list.
                 log.debug("Removed slave switch {} from active switch" +
                         " list", HexString.toHexString(sw.getId()));
                 removeSwitch(sw);
             }
 
-            // Indicate that we have received a role reply message. 
+            // Indicate that we have received a role reply message.
             state.firstRoleReplyReceived = true;
         }
 
@@ -894,9 +896,9 @@
                     break;
                 case ERROR:
                     log.debug("Recieved ERROR message from switch {}: {}", sw, m);
-                    // TODO: we need better error handling. Especially for 
+                    // TODO: we need better error handling. Especially for
                     // request/reply style message (stats, roles) we should have
-                    // a unified way to lookup the xid in the error message. 
+                    // a unified way to lookup the xid in the error message.
                     // This will probable involve rewriting the way we handle
                     // request/reply style messages.
                     OFError error = (OFError) m;
@@ -907,9 +909,9 @@
                         boolean isBadVendorError =
                                 (error.getErrorType() == OFError.OFErrorType.
                                         OFPET_BAD_REQUEST.getValue());
-                        // We expect to receive a bad vendor error when 
-                        // we're connected to a switch that doesn't support 
-                        // the Nicira vendor extensions (i.e. not OVS or 
+                        // We expect to receive a bad vendor error when
+                        // we're connected to a switch that doesn't support
+                        // the Nicira vendor extensions (i.e. not OVS or
                         // derived from OVS).  By protocol, it should also be
                         // BAD_VENDOR, but too many switch implementations
                         // get it wrong and we can already check the xid()
@@ -933,7 +935,7 @@
                                     //is now never SLAVE, always MASTER.
                                     // the switch doesn't understand role request
                                     // messages and the current controller role is
-                                    // slave. We need to disconnect the switch. 
+                                    // slave. We need to disconnect the switch.
                                     // @see RoleChanger for rationale
                                     log.warn("Closing {} channel because controller's role " +
                                             "is SLAVE", sw);
@@ -942,36 +944,36 @@
                                     log.debug("Adding switch {} because we got an error" +
                                             " returned from a MASTER role request", sw);
                                     // Controller's role is master: add to
-                                    // active 
+                                    // active
                                     // TODO: check if clearing flow table is
                                     // right choice here.
                                     // Need to clear FlowMods before we add the switch
                                     // and dispatch updates otherwise we have a race condition.
                                     // TODO: switch update is async. Won't we still have a potential
-                                    //       race condition? 
+                                    //       race condition?
                                     sw.clearAllFlowMods();
                                     addSwitch(sw);
                                 }
                             }
                         } else {
                             // TODO: Is this the right thing to do if we receive
-                            // some other error besides a bad vendor error? 
+                            // some other error besides a bad vendor error?
                             // Presumably that means the switch did actually
-                            // understand the role request message, but there 
+                            // understand the role request message, but there
                             // was some other error from processing the message.
                             // OF 1.2 specifies a OFPET_ROLE_REQUEST_FAILED
-                            // error code, but it doesn't look like the Nicira 
-                            // role request has that. Should check OVS source 
+                            // error code, but it doesn't look like the Nicira
+                            // role request has that. Should check OVS source
                             // code to see if it's possible for any other errors
                             // to be returned.
                             // If we received an error the switch is not
-                            // in the correct role, so we need to disconnect it. 
+                            // in the correct role, so we need to disconnect it.
                             // We could also resend the request but then we need to
                             // check if there are other pending request in which
                             // case we shouldn't resend. If we do resend we need
                             // to make sure that the switch eventually accepts one
                             // of our requests or disconnect the switch. This feels
-                            // cumbersome. 
+                            // cumbersome.
                             log.debug("Closing {} channel because we recieved an " +
                                     "error other than BAD_VENDOR", sw);
                             sw.getChannel().close();
@@ -995,8 +997,8 @@
                     }
                     break;
                 case PORT_STATUS:
-                    // We want to update our port state info even if we're in 
-                    // the slave role, but we only want to update storage if 
+                    // We want to update our port state info even if we're in
+                    // the slave role, but we only want to update storage if
                     // we're the master (or equal).
                     boolean updateStorage = state.hsState.
                             equals(HandshakeState.READY) &&
@@ -1019,20 +1021,20 @@
                                     "from switch {} before switch is " +
                                     "fully configured.", m.getType(), sw);
                         }
-                        // Check if the controller is in the slave role for the 
-                        // switch. If it is, then don't dispatch the message to 
+                        // Check if the controller is in the slave role for the
+                        // switch. If it is, then don't dispatch the message to
                         // the listeners.
-                        // TODO: Should we dispatch messages that we expect to 
-                        // receive when we're in the slave role, e.g. port 
-                        // status messages? Since we're "hiding" switches from 
-                        // the listeners when we're in the slave role, then it 
+                        // TODO: Should we dispatch messages that we expect to
+                        // receive when we're in the slave role, e.g. port
+                        // status messages? Since we're "hiding" switches from
+                        // the listeners when we're in the slave role, then it
                         // seems a little weird to dispatch port status messages
-                        // to them. On the other hand there might be special 
+                        // to them. On the other hand there might be special
                         // modules that care about all of the connected switches
                         // and would like to receive port status notifications.
                         else if (sw.getRole() == Role.SLAVE) {
-                            // Don't log message if it's a port status message 
-                            // since we expect to receive those from the switch 
+                            // Don't log message if it's a port status message
+                            // since we expect to receive those from the switch
                             // and don't want to emit spurious messages.
                             if (m.getType() != OFType.PORT_STATUS) {
                                 log.debug("Ignoring message type {} received " +
@@ -1178,6 +1180,7 @@
                     explanation = "The switch sent a message not handled by " +
                             "the controller")
     })
+    @SuppressWarnings("fallthrough")
     protected void handleMessage(IOFSwitch sw, OFMessage m,
                                  FloodlightContext bContext)
             throws IOException {
diff --git a/src/main/java/net/floodlightcontroller/core/web/SwitchResourceBase.java b/src/main/java/net/floodlightcontroller/core/web/SwitchResourceBase.java
index 835cb17..47f6175 100644
--- a/src/main/java/net/floodlightcontroller/core/web/SwitchResourceBase.java
+++ b/src/main/java/net/floodlightcontroller/core/web/SwitchResourceBase.java
@@ -47,6 +47,7 @@
  *
  * @author readams
  */
+
 public class SwitchResourceBase extends ServerResource {
     protected final static Logger log = LoggerFactory.getLogger(SwitchResourceBase.class);
 
@@ -100,12 +101,12 @@
                 requestLength += specificReq.getLength();
             } else if (statType == OFStatisticsType.PORT) {
                 OFPortStatisticsRequest specificReq = new OFPortStatisticsRequest();
-                specificReq.setPortNumber((short) OFPort.OFPP_NONE.getValue());
+                specificReq.setPortNumber(OFPort.OFPP_NONE.getValue());
                 req.setStatistics(Collections.singletonList((OFStatistics) specificReq));
                 requestLength += specificReq.getLength();
             } else if (statType == OFStatisticsType.QUEUE) {
                 OFQueueStatisticsRequest specificReq = new OFQueueStatisticsRequest();
-                specificReq.setPortNumber((short) OFPort.OFPP_ALL.getValue());
+                specificReq.setPortNumber(OFPort.OFPP_ALL.getValue());
                 // LOOK! openflowj does not define OFPQ_ALL! pulled this from openflow.h
                 // note that I haven't seen this work yet though...
                 specificReq.setQueueId(0xffffffff);
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 df70dd4..9fd8870 100644
--- a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
+++ b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
@@ -374,6 +374,7 @@
             ShortestPathIntent intent = new ShortestPathIntent(intentId,
                     sw.getDpid(), inPort.getNumber(), srcMacAddress.toLong(),
                     destinationDpid, destinationPort, dstMacAddress.toLong());
+
             intent.setIdleTimeout(idleTimeout + SRC_SWITCH_TIMEOUT_ADJUST_SECOND);
             intent.setFirstSwitchIdleTimeout(idleTimeout);
             IntentOperation.Operator operator = IntentOperation.Operator.ADD;
diff --git a/src/main/java/net/onrc/onos/core/datagrid/IEventChannel.java b/src/main/java/net/onrc/onos/core/datagrid/IEventChannel.java
index 0c1663a..23b7be9 100644
--- a/src/main/java/net/onrc/onos/core/datagrid/IEventChannel.java
+++ b/src/main/java/net/onrc/onos/core/datagrid/IEventChannel.java
@@ -79,7 +79,7 @@
      * @param key the key of the entry to get.
      * @return the entry if found, otherwise null.
      */
-    @Deprecated
+    // TODO - this is intended to be refactored and removed
     V getEntry(K key);
 
     /**
@@ -87,12 +87,12 @@
      *
      * @return all entries that are currently in the channel.
      */
-    @Deprecated
+    // TODO - this is intended to be refactored and removed
     Collection<V> getAllEntries();
 
     /**
      * Remove all entries in the channel.
      */
-    @Deprecated
+    // TODO - this is intended to be refactored and removed
     void removeAllEntries();
 }
diff --git a/src/main/java/net/onrc/onos/core/datastore/serializers/Device.java b/src/main/java/net/onrc/onos/core/datastore/serializers/Device.java
index 41b9991..0bbf5af 100644
--- a/src/main/java/net/onrc/onos/core/datastore/serializers/Device.java
+++ b/src/main/java/net/onrc/onos/core/datastore/serializers/Device.java
@@ -588,7 +588,7 @@
       public Builder addAllPortIds(
           java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
         ensurePortIdsIsMutable();
-        super.addAll(values, portIds_);
+        Builder.addAll(values, portIds_);
         onChanged();
         return this;
       }
diff --git a/src/main/java/net/onrc/onos/core/intent/ShortestPathIntent.java b/src/main/java/net/onrc/onos/core/intent/ShortestPathIntent.java
index 660cb7c..3c8d345 100644
--- a/src/main/java/net/onrc/onos/core/intent/ShortestPathIntent.java
+++ b/src/main/java/net/onrc/onos/core/intent/ShortestPathIntent.java
@@ -110,42 +110,42 @@
         return pathIntentId;
     }
 
-    @Deprecated
+    // TODO - this is intended to be refactored and removed
     public int getIdleTimeout() {
         return idleTimeout;
     }
 
-    @Deprecated
+    // TODO - this is intended to be refactored and removed
     public int getHardTimeout() {
         return hardTimeout;
     }
 
-    @Deprecated
+    // TODO - this is intended to be refactored and removed
     public void setIdleTimeout(int idleTimeout) {
         this.idleTimeout = idleTimeout;
     }
 
-    @Deprecated
+    // TODO - this is intended to be refactored and removed
     public void setHardTimeout(int hardTimeout) {
         this.hardTimeout = hardTimeout;
     }
 
-    @Deprecated
+    // TODO - this is intended to be refactored and removed
     public int getFirstSwitchIdleTimeout() {
         return firstSwitchIdleTimeout;
     }
 
-    @Deprecated
+    // TODO - this is intended to be refactored and removed
     public int getFirstSwitchHardTimetout() {
         return firstSwitchHardTimetout;
     }
 
-    @Deprecated
+    // TODO - this is intended to be refactored and removed
     public void setFirstSwitchIdleTimeout(int firstSwitchIdleTimeout) {
         this.firstSwitchIdleTimeout = firstSwitchIdleTimeout;
     }
 
-    @Deprecated
+    // TODO - this is intended to be refactored and removed
     public void setFirstSwitchHardTimetout(int firstSwitchHardTimetout) {
         this.firstSwitchHardTimetout = firstSwitchHardTimetout;
     }
diff --git a/src/main/java/org/openflow/protocol/OFFlowMod.java b/src/main/java/org/openflow/protocol/OFFlowMod.java
index 51b5de3..0ec8be9 100644
--- a/src/main/java/org/openflow/protocol/OFFlowMod.java
+++ b/src/main/java/org/openflow/protocol/OFFlowMod.java
@@ -367,7 +367,7 @@
         flowMod.setMatch(neoMatch);
         List<OFAction> neoActions = new LinkedList<OFAction>();
         for(OFAction action: this.actions)
-            neoActions.add((OFAction) action.clone());
+            neoActions.add(action.clone());
         flowMod.setActions(neoActions);
         return flowMod;
     }
diff --git a/src/main/java/org/openflow/protocol/OFMatchBeanInfo.java b/src/main/java/org/openflow/protocol/OFMatchBeanInfo.java
index 16a813f..5309ce0 100644
--- a/src/main/java/org/openflow/protocol/OFMatchBeanInfo.java
+++ b/src/main/java/org/openflow/protocol/OFMatchBeanInfo.java
@@ -37,7 +37,7 @@
  * @author Rob Sherwood (rob.sherwood@stanford.edu)
  *
  */
-
+@SuppressWarnings("rawtypes")
 public class OFMatchBeanInfo extends SimpleBeanInfo {
 
     @Override
diff --git a/src/main/java/org/openflow/protocol/OFType.java b/src/main/java/org/openflow/protocol/OFType.java
index c828f0a..7428c9c 100644
--- a/src/main/java/org/openflow/protocol/OFType.java
+++ b/src/main/java/org/openflow/protocol/OFType.java
@@ -27,6 +27,7 @@
  * @author David Erickson (daviderickson@cs.stanford.edu)
  *
  */
+@SuppressWarnings("rawtypes")
 public enum OFType {
     HELLO               (0, OFHello.class, new Instantiable<OFMessage>() {
                             @Override
diff --git a/src/main/java/org/openflow/protocol/action/OFActionType.java b/src/main/java/org/openflow/protocol/action/OFActionType.java
index b0c2c47..84c0801 100644
--- a/src/main/java/org/openflow/protocol/action/OFActionType.java
+++ b/src/main/java/org/openflow/protocol/action/OFActionType.java
@@ -30,6 +30,7 @@
  *
  * @author David Erickson (daviderickson@cs.stanford.edu)
  */
+@SuppressWarnings("rawtypes")
 public enum OFActionType {
     OUTPUT              (0, OFActionOutput.class, new Instantiable<OFAction>() {
                             @Override
diff --git a/src/main/java/org/openflow/protocol/statistics/OFStatisticsType.java b/src/main/java/org/openflow/protocol/statistics/OFStatisticsType.java
index f2b9e30..4a84674 100644
--- a/src/main/java/org/openflow/protocol/statistics/OFStatisticsType.java
+++ b/src/main/java/org/openflow/protocol/statistics/OFStatisticsType.java
@@ -22,6 +22,7 @@
 import org.openflow.protocol.Instantiable;
 import org.openflow.protocol.OFType;
 
+@SuppressWarnings("rawtypes")
 public enum OFStatisticsType {
     DESC        (0, OFDescriptionStatistics.class, OFDescriptionStatistics.class,
                     new Instantiable<OFStatistics>() {
diff --git a/src/test/java/net/onrc/onos/apps/proxyarp/ProxyArpManagerTest.java b/src/test/java/net/onrc/onos/apps/proxyarp/ProxyArpManagerTest.java
index e34bde9..f0ebc7a 100644
--- a/src/test/java/net/onrc/onos/apps/proxyarp/ProxyArpManagerTest.java
+++ b/src/test/java/net/onrc/onos/apps/proxyarp/ProxyArpManagerTest.java
@@ -44,6 +44,7 @@
 
 @RunWith(PowerMockRunner.class)
 @PrepareForTest({ ProxyArpManager.class, ArpCache.class })
+@SuppressWarnings({ "rawtypes", "unchecked" })
 public class ProxyArpManagerTest {
     String defaultStrAgingMsec = "60000";
     String defaultStrCleanupMsec = "60000";
diff --git a/src/test/java/net/onrc/onos/core/devicemanager/OnosDeviceManagerTest.java b/src/test/java/net/onrc/onos/core/devicemanager/OnosDeviceManagerTest.java
index dd104e2..fc0a008 100644
--- a/src/test/java/net/onrc/onos/core/devicemanager/OnosDeviceManagerTest.java
+++ b/src/test/java/net/onrc/onos/core/devicemanager/OnosDeviceManagerTest.java
@@ -64,6 +64,7 @@
 
     @Override
     @Before
+    @SuppressWarnings("unchecked")
     public void setUp() throws Exception {
         super.setUp();
         MockTopology topology = new MockTopology();
diff --git a/src/test/java/org/openflow/protocol/OFErrorTest.java b/src/test/java/org/openflow/protocol/OFErrorTest.java
index 45d5257..7acd727 100644
--- a/src/test/java/org/openflow/protocol/OFErrorTest.java
+++ b/src/test/java/org/openflow/protocol/OFErrorTest.java
@@ -34,14 +34,14 @@
     public void testWriteRead() throws Exception {
         OFError msg = (OFError) messageFactory.getMessage(OFType.ERROR);
         msg.setMessageFactory(messageFactory);
-        msg.setErrorType((short) OFErrorType.OFPET_HELLO_FAILED.getValue());
+        msg.setErrorType(OFErrorType.OFPET_HELLO_FAILED.getValue());
         msg.setErrorCode((short) OFHelloFailedCode.OFPHFC_INCOMPATIBLE
                 .ordinal());
         ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
         bb.clear();
         msg.writeTo(bb);
         msg.readFrom(bb);
-        TestCase.assertEquals((short) OFErrorType.OFPET_HELLO_FAILED.getValue(),
+        TestCase.assertEquals(OFErrorType.OFPET_HELLO_FAILED.getValue(),
                 msg.getErrorType());
         TestCase.assertEquals((short) OFHelloFailedCode.OFPHFC_INCOMPATIBLE
                 .ordinal(), msg.getErrorType());
@@ -51,7 +51,7 @@
         bb.clear();
         msg.writeTo(bb);
         msg.readFrom(bb);
-        TestCase.assertEquals((short) OFErrorType.OFPET_HELLO_FAILED.getValue(),
+        TestCase.assertEquals(OFErrorType.OFPET_HELLO_FAILED.getValue(),
                 msg.getErrorType());
         TestCase.assertEquals((short) OFHelloFailedCode.OFPHFC_INCOMPATIBLE
                 .ordinal(), msg.getErrorType());
