Adjust to yangtools-2.0.0/odlparent-3.0.0 changes
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / utils / RestconfDataServiceConstant.java
index c0acdcb0ca95a13472dc5f5bd52c21a1b88f8b05..8077b5cc002e8cfb44ce53ce29ce9bce4ecfad56 100644 (file)
@@ -8,10 +8,6 @@
 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;
 
@@ -21,18 +17,8 @@ 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.");