diff --git a/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java b/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java index faf1457cb0..000e51536b 100644 --- a/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java +++ b/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java @@ -55,7 +55,6 @@ import java.io.ByteArrayInputStream; import java.io.File; -import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.sql.Connection; @@ -1843,12 +1842,6 @@ protected ItemData getItemByName(NodeData parent, String parentId, QPathEntry na { throw new RepositoryException(e); } - catch (FileNotFoundException e) - { - LOG.error("Unable to read binary content from disk for node " + parent.getQPath() + ". The binary content is not " - + "accessible, it was removed, or may have been quarantined by an antivirus.",e); - throw new RepositoryException(e); - } catch (IOException e) { throw new RepositoryException(e); diff --git a/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java b/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java index 7a932ca39d..6752a36a5b 100644 --- a/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java +++ b/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java @@ -50,7 +50,6 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import java.util.ResourceBundle; import javax.jcr.Node; import javax.jcr.PathNotFoundException; @@ -59,7 +58,6 @@ import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -import javax.xml.namespace.QName; import javax.xml.transform.stream.StreamSource; /** @@ -172,21 +170,6 @@ else if (ifModifiedSince != null) } } - try { - if (resource instanceof VersionResource){ - ((VersionResource) resource).contentNode().getProperty("jcr:data"); - } else { - resource.getProperty(new QName("jcr","data","jcr")); - } - } catch (RepositoryException exc) { - //it can fail here if the binary data is not available - //(due to data corruption or antivirus quarantine) - //In this case, we should display a readable message for the user - LOG.error(exc.getMessage(), exc); - String message = "The requested resource ("+path+") is no longer available. Please contact your administrator."; - return Response.status(HTTPStatus.NOT_FOUND).entity(message).build(); - } - HierarchicalProperty contentLengthProperty = resource.getProperty(FileResource.GETCONTENTLENGTH); long contentLength = new Long(contentLengthProperty.getValue());