Bug 165 and changed operations
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / main / java / org / opendaylight / controller / sal / restconf / impl / RestconfImpl.xtend
index a4587fa787fdff3af7b5dedab4b22505375fe37c..8f6ca1685bbb4b0c6f81ec2dc85ae4fd4c92d5f2 100644 (file)
@@ -119,8 +119,7 @@ class RestconfImpl implements RestconfService {
     private def InstanceIdWithSchemaNode resolveInstanceIdentifier(String identifier) {
         val identifierWithSchemaNode = identifier.toInstanceIdentifier
         if (identifierWithSchemaNode === null) {
-            throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST).entity("URI has bad format")
-                    .build());
+            throw new ResponseException(Response.Status.BAD_REQUEST, "URI has bad format");
         }
         return identifierWithSchemaNode
     }