if ( handler == null ) {
logger.debug("No handler found to handle update of resource with scheme {}", tr.getScheme());
} else {
final InputStream localIS = data.getInputStream();
try {
final UpdateResult result = (localIS == null ? handler.handleUpdate(resourceType, entityId, tr.getURL(), data.getDictionary(), attributes)
: handler.handleUpdate(resourceType, entityId, tr.getURL(), localIS, attributes));
if ( result != null ) {
if ( !result.getURL().equals(tr.getURL()) && !result.getResourceIsMoved() ) {
// resource has been added!
final InternalResource internalResource = new InternalResource(result.getScheme(),