import java.io.OutputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
+import java.util.concurrent.ExecutionException;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import org.opendaylight.restconf.common.schema.SchemaExportContext;
import org.opendaylight.restconf.nb.rfc8040.Rfc8040;
import org.opendaylight.yangtools.yang.model.repo.api.RevisionSourceIdentifier;
-import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceException;
import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
@Provider
final MultivaluedMap<String, Object> httpHeaders, final OutputStream entityStream) throws IOException,
WebApplicationException {
final RevisionSourceIdentifier sourceId = RevisionSourceIdentifier.create(context.getModule().getName(),
- context.getModule().getQNameModule().getFormattedRevision());
+ context.getModule().getQNameModule().getRevision());
final YangTextSchemaSource yangTextSchemaSource;
try {
- yangTextSchemaSource = context.getSourceProvider().getSource(sourceId).checkedGet();
- } catch (SchemaSourceException e) {
+ yangTextSchemaSource = context.getSourceProvider().getSource(sourceId).get();
+ } catch (InterruptedException | ExecutionException e) {
throw new WebApplicationException("Unable to retrieve source from SourceProvider.", e);
}
yangTextSchemaSource.copyTo(entityStream);