REPO-4791 Use Local transforms where Legacy transforms are called.

- Transform count for transformationsByExtension list had gaps
This commit is contained in:
Alan Davis
2019-12-04 15:48:43 +00:00
parent 06d8251015
commit f44b11ead8

View File

@@ -1210,20 +1210,22 @@ public class TransformerDebug implements ApplicationContextAware
transformerConfig.getPriority(availableTransformer.get(1), sourceMimetype, targetMimetype)))
{
// Log the transformers
try
{
pushMisc();
int transformerCount = 0;
LocalTransform localTransform = localTransformServiceRegistryImpl == null
? null
: localTransformServiceRegistryImpl.getLocalTransform(sourceMimetype,
-1, targetMimetype, Collections.emptyMap(), null);
if (localTransform != null || size >= 1)
{
try
{
pushMisc();
int transformerCount = 0;
if (localTransform != null)
{
long maxSourceSizeKBytes = localTransformServiceRegistryImpl.findMaxSize(sourceMimetype,
targetMimetype, Collections.emptyMap(), null);
String transformName = localTransform instanceof AbstractLocalTransform
? "Local:"+((AbstractLocalTransform)localTransform).getName()
? "Local:" + ((AbstractLocalTransform) localTransform).getName()
: "";
activeTransformer(sourceMimetype, targetMimetype, transformerCount, " [0]",
transformName, maxSourceSizeKBytes, transformerCount++ == 0);
@@ -1248,6 +1250,7 @@ public class TransformerDebug implements ApplicationContextAware
}
}
}
}
finally
{
popMisc();