Fix Sonar critical flagged bugs

Change-Id: I60e9f72a1a66f65366d7dbc5335922e75097c9f3
diff --git a/drivers/src/main/java/org/onosproject/driver/handshaker/OFOpticalSwitch13.java b/drivers/src/main/java/org/onosproject/driver/handshaker/OFOpticalSwitch13.java
index 5c6ce36..c7409e9 100644
--- a/drivers/src/main/java/org/onosproject/driver/handshaker/OFOpticalSwitch13.java
+++ b/drivers/src/main/java/org/onosproject/driver/handshaker/OFOpticalSwitch13.java
@@ -70,9 +70,7 @@
         try {
             sendHandshakeOFExperimenterPortDescRequest();
         } catch (IOException e) {
-            log.error("Failed to send handshaker message OFExperimenterPortDescRequestfor sw {}, {}",
-                     getStringId(), e.getMessage());
-            e.printStackTrace();
+            log.error("Failed to send handshaker message OFExperimenterPortDescRequestfor sw {}", e);
         }
     }
 
diff --git a/drivers/src/main/java/org/onosproject/driver/handshaker/OfOpticalSwitchImplLinc13.java b/drivers/src/main/java/org/onosproject/driver/handshaker/OfOpticalSwitchImplLinc13.java
index adcbb50..5f8c82f 100644
--- a/drivers/src/main/java/org/onosproject/driver/handshaker/OfOpticalSwitchImplLinc13.java
+++ b/drivers/src/main/java/org/onosproject/driver/handshaker/OfOpticalSwitchImplLinc13.java
@@ -96,8 +96,7 @@
             sendHandshakeOFExperimenterPortDescRequest();
         } catch (IOException e) {
             log.error("LINC-OE exception while sending experimenter port desc:",
-                     e.getMessage());
-            e.printStackTrace();
+                     e);
         }
     }
 
diff --git a/drivers/src/main/java/org/onosproject/driver/netconf/XmlConfigParser.java b/drivers/src/main/java/org/onosproject/driver/netconf/XmlConfigParser.java
index 55826a2..5443097 100644
--- a/drivers/src/main/java/org/onosproject/driver/netconf/XmlConfigParser.java
+++ b/drivers/src/main/java/org/onosproject/driver/netconf/XmlConfigParser.java
@@ -111,7 +111,7 @@
         try {
             editcfg.save(stringWriter);
         } catch (ConfigurationException e) {
-            e.printStackTrace();
+            log.error("createControllersConfig()", e);
         }
         String s = stringWriter.toString()
                 .replaceAll("<controller>",