use of com.vaadin.flow.server.StreamRegistration in project flow by vaadin.
the class ElementAttributeMap method unsetResource.
private void unsetResource(String attribute) {
ensureResourceRegistrations();
StreamRegistration registration = resourceRegistrations.get(attribute);
Optional<AbstractStreamResource> resource = Optional.empty();
if (registration != null) {
resource = Optional.ofNullable(registration.getResource());
}
unregisterResource(attribute);
resource.ifPresent(res -> deferRegistration(attribute, res));
}
Aggregations