mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-24 14:32:01 +00:00
* REPO-4099 Change of mimetype to unsupported rendition hangs Share (#298) Only include URL and mimetype when working out the content hashCode as we don't want it to change if deleted.
This commit is contained in:
@@ -494,7 +494,7 @@ public class RenditionService2Impl implements RenditionService2, InitializingBea
|
||||
if (contentData != null)
|
||||
{
|
||||
// Originally we used the contentData URL, but that is not enough if the mimetype changes.
|
||||
String contentString = contentData.toString();
|
||||
String contentString = contentData.getContentUrl()+contentData.getMimetype();
|
||||
if (contentString != null)
|
||||
{
|
||||
hashCode = contentString.hashCode();
|
||||
|
@@ -137,10 +137,8 @@ public class LegacyLocalTransformClientIntegrationTest extends AbstractRendition
|
||||
// split into separate transactions as the client is async
|
||||
NodeRef sourceNode = transactionService.getRetryingTransactionHelper().doInTransaction(() ->
|
||||
createContentNodeFromQuickFile(testFileName));
|
||||
int sourceContentHashCode = DefaultTypeConverter.INSTANCE.convert(
|
||||
ContentData.class,
|
||||
nodeService.getProperty(sourceNode, PROP_CONTENT))
|
||||
.toString().hashCode();
|
||||
ContentData contentData = DefaultTypeConverter.INSTANCE.convert(ContentData.class, nodeService.getProperty(sourceNode, PROP_CONTENT));
|
||||
int sourceContentHashCode = (contentData == null ? "" : contentData.getContentUrl()+contentData.getMimetype()).hashCode();
|
||||
transactionService.getRetryingTransactionHelper().doInTransaction(() ->
|
||||
{
|
||||
RenditionDefinition2 renditionDefinition =
|
||||
|
Reference in New Issue
Block a user