X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fnetconf-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fapi%2FNetconfDocumentedException.java;h=2adb4984b8a61e32d9ad024352b205460d1d3d56;hb=47c1b8e3d9835d336c79d6b4ca4e61417a05039e;hp=10f1020bde55be5a20d6cc021a5390834d1ad1ed;hpb=b63c5edc0f896e131846e975340cef7e9f1e0f36;p=netconf.git diff --git a/netconf/netconf-api/src/main/java/org/opendaylight/netconf/api/NetconfDocumentedException.java b/netconf/netconf-api/src/main/java/org/opendaylight/netconf/api/NetconfDocumentedException.java index 10f1020bde..2adb4984b8 100644 --- a/netconf/netconf-api/src/main/java/org/opendaylight/netconf/api/NetconfDocumentedException.java +++ b/netconf/netconf-api/src/main/java/org/opendaylight/netconf/api/NetconfDocumentedException.java @@ -8,41 +8,49 @@ 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); } - public NetconfDocumentedException(final String message, final ErrorType errorType, final ErrorTag errorTag, final ErrorSeverity errorSeverity) { + public NetconfDocumentedException(final String message, final ErrorType errorType, final ErrorTag errorTag, + final ErrorSeverity errorSeverity) { super(message, errorType, errorTag, errorSeverity); } - public NetconfDocumentedException(final String message, final ErrorType errorType, final ErrorTag errorTag, final ErrorSeverity errorSeverity, final Map errorInfo) { + public NetconfDocumentedException(final String message, final ErrorType errorType, final ErrorTag errorTag, + final ErrorSeverity errorSeverity, final Map errorInfo) { super(message, errorType, errorTag, errorSeverity, errorInfo); } - public NetconfDocumentedException(final String message, final Exception cause, final ErrorType errorType, final ErrorTag errorTag, final ErrorSeverity errorSeverity) { + public NetconfDocumentedException(final String message, final Exception cause, final ErrorType errorType, + final ErrorTag errorTag, final ErrorSeverity errorSeverity) { super(message, cause, errorType, errorTag, errorSeverity); } - public NetconfDocumentedException(final String message, final Exception cause, final ErrorType errorType, final ErrorTag errorTag, final ErrorSeverity errorSeverity, final Map errorInfo) { + public NetconfDocumentedException(final String message, final Exception cause, final ErrorType errorType, + final ErrorTag errorTag, final ErrorSeverity errorSeverity, + final Map errorInfo) { super(message, cause, errorType, errorTag, errorSeverity, errorInfo); } - public NetconfDocumentedException(DocumentedException e) { - super(e.getMessage(), (Exception) e.getCause(), e.getErrorType(), e.getErrorTag(), e.getErrorSeverity(), e.getErrorInfo()); + @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)); } }