Fix critical Sonar Issue: OvsdbConnectionService.java 22/15822/1
authorFlavio Fernandes <ffernand@redhat.com>
Fri, 27 Feb 2015 12:50:35 +0000 (07:50 -0500)
committerFlavio Fernandes <ffernand@redhat.com>
Fri, 27 Feb 2015 12:50:35 +0000 (07:50 -0500)
Fix for the following issue:
- Throwable.printStackTrace(...) should never be called

Ref link on logging:
https://wiki.opendaylight.org/view/Logging_Best_Practices

Change-Id: I283f44deb8822b7f445a7cf48b89bec14d3c7df6
Ref: http://sonar.opendaylight.org/component/index#component=org.opendaylight.ovsdb%3Alibrary%3Asrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fovsdb%2Flib%2Fimpl%2FOvsdbConnectionService.java&currentIssue=3c103a64-c1a4-421a-9f4a-17979810815b
Signed-off-by: Flavio Fernandes <ffernand@redhat.com>
library/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbConnectionService.java

index 17df805dabf1c908f8c334e181c29be9182f09ec..8868ce3b6a99c1d39b8b9e0afb82051d846183f4 100644 (file)
@@ -289,8 +289,7 @@ public class OvsdbConnectionService implements OvsdbConnection {
                         try {
                             Thread.sleep(100);
                         } catch (InterruptedException e) {
-                            logger.error("Exception : {}", e.toString());
-                            e.printStackTrace();
+                            logger.error("Exception while checking if ssl handshake is done", e);
                         }
                         count++;
                     }