Fix findbugs violations in netconf
[netconf.git] / netconf / netconf-api / src / main / java / org / opendaylight / netconf / api / NetconfDocumentedException.java
index 94735b07249e9a3acad2fcfc50bc713f498c0b19..2adb4984b8a61e32d9ad024352b205460d1d3d56 100644 (file)
@@ -8,15 +8,16 @@
 
 package org.opendaylight.netconf.api;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.util.Map;
 import org.opendaylight.controller.config.util.xml.DocumentedException;
 import org.w3c.dom.Document;
 
 /**
- * Checked exception to communicate an error that needs to be sent to the
- * netconf client.
+ * Checked exception to communicate an error that needs to be sent to the netconf client.
  */
 public class NetconfDocumentedException extends DocumentedException {
+    private static final long serialVersionUID = 1L;
 
     public NetconfDocumentedException(final String message) {
         super(message);
@@ -43,12 +44,13 @@ public class NetconfDocumentedException extends DocumentedException {
         super(message, cause, errorType, errorTag, errorSeverity, errorInfo);
     }
 
-    public NetconfDocumentedException(DocumentedException exception) {
+    @SuppressFBWarnings("BC_UNCONFIRMED_CAST_OF_RETURN_VALUE")
+    public NetconfDocumentedException(final DocumentedException exception) {
         super(exception.getMessage(), (Exception) exception.getCause(), exception.getErrorType(),
                 exception.getErrorTag(), exception.getErrorSeverity(), exception.getErrorInfo());
     }
 
-    public static NetconfDocumentedException fromXMLDocument(Document fromDoc) {
+    public static NetconfDocumentedException fromXMLDocument(final Document fromDoc) {
         return new NetconfDocumentedException(DocumentedException.fromXMLDocument(fromDoc));
     }
 }