Sonar: Exception handler should preserve exception
[lispflowmapping.git] / mappingservice / implementation / src / main / java / org / opendaylight / lispflowmapping / implementation / authentication / LispMACAuthentication.java
index 715810607fd56a60b1f194bfa425827c3771336d..ed92ec9aa792dd0f18971b295fff971cd8b022cd 100644 (file)
@@ -18,8 +18,8 @@ import javax.crypto.spec.SecretKeySpec;
 import org.opendaylight.lispflowmapping.interfaces.lisp.ILispAuthentication;
 import org.opendaylight.lispflowmapping.lisp.serializer.MapNotifySerializer;
 import org.opendaylight.lispflowmapping.lisp.serializer.MapRegisterSerializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev150820.MapNotify;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev150820.MapRegister;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MapNotify;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MapRegister;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -37,7 +37,7 @@ public class LispMACAuthentication implements ILispAuthentication {
             authenticationLength = Mac.getInstance(algorithm).getMacLength();
             tempAuthenticationData = new byte[authenticationLength];
         } catch (NoSuchAlgorithmException e) {
-            LOG.warn("No such MAC algorithm" + algorithm);
+            LOG.warn("No such MAC algorithm {}", algorithm, e);
         }
     }
 
@@ -66,9 +66,9 @@ public class LispMACAuthentication implements ILispAuthentication {
 
             return mac.doFinal(data);
         } catch (InvalidKeyException e) {
-            LOG.warn("Invalid password" + key);
+            LOG.warn("Invalid password {}", key, e);
         } catch (NoSuchAlgorithmException e) {
-            LOG.warn("No such MAC algorithm" + algorithm);
+            LOG.warn("No such MAC algorithm {}", algorithm, e);
         }
         return null;
     }