package org.opendaylight.restconf.nb.rfc8040.rests.utils;
import java.net.URI;
-import java.net.URISyntaxException;
-import org.opendaylight.restconf.common.errors.RestconfDocumentedException;
-import org.opendaylight.restconf.common.errors.RestconfError.ErrorTag;
-import org.opendaylight.restconf.common.errors.RestconfError.ErrorType;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.common.QNameModule;
*/
public final class RestconfDataServiceConstant {
- public static final QName NETCONF_BASE_QNAME;
-
- static {
- try {
- NETCONF_BASE_QNAME = QName.create(
- QNameModule.create(new URI(PutData.NETCONF_BASE), null), PutData.NETCONF_BASE_PAYLOAD_NAME);
- } catch (final URISyntaxException e) {
- final String errMsg = "It wasn't possible to create instance of URI class with " + PutData.NETCONF_BASE
- + " URI";
- throw new RestconfDocumentedException(errMsg, ErrorType.APPLICATION, ErrorTag.OPERATION_FAILED);
- }
- }
+ public static final QName NETCONF_BASE_QNAME = QName.create(QNameModule.create(URI.create(PutData.NETCONF_BASE)),
+ PutData.NETCONF_BASE_PAYLOAD_NAME);
private RestconfDataServiceConstant() {
throw new UnsupportedOperationException("Util class.");