import java.net.URI;
import javax.ws.rs.Path;
import javax.ws.rs.core.UriInfo;
-import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
-import org.opendaylight.controller.md.sal.dom.api.DOMRpcResult;
+import org.opendaylight.mdsal.dom.api.DOMMountPoint;
+import org.opendaylight.mdsal.dom.api.DOMRpcResult;
import org.opendaylight.restconf.common.context.InstanceIdentifierContext;
import org.opendaylight.restconf.common.context.NormalizedNodeContext;
import org.opendaylight.restconf.common.errors.RestconfDocumentedException;
@Path("/")
public class RestconfInvokeOperationsServiceImpl implements RestconfInvokeOperationsService {
- private RpcServiceHandler rpcServiceHandler;
- private SchemaContextHandler schemaContextHandler;
+ private volatile RpcServiceHandler rpcServiceHandler;
+ private volatile SchemaContextHandler schemaContextHandler;
public RestconfInvokeOperationsServiceImpl(final RpcServiceHandler rpcServiceHandler,
final SchemaContextHandler schemaContextHandler) {
final DOMRpcResult result = RestconfInvokeOperationsUtil.checkResponse(response);
RpcDefinition resultNodeSchema = null;
- final NormalizedNode<?, ?> resultData = result.getResult();
- if ((result != null) && (result.getResult() != null)) {
+ NormalizedNode<?, ?> resultData = null;
+ if (result != null && result.getResult() != null) {
+ resultData = result.getResult();
resultNodeSchema = (RpcDefinition) payload.getInstanceIdentifierContext().getSchemaNode();
}
- return new NormalizedNodeContext(new InstanceIdentifierContext<RpcDefinition>(null, resultNodeSchema,
+ return new NormalizedNodeContext(new InstanceIdentifierContext<>(null, resultNodeSchema,
mountPoint, schemaContextRef.get()), resultData);
}
}