mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
92488: Merged 5.0.N (5.0.1) to HEAD-BUG-FIX (5.1/Cloud) 92487: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.1) 92486: MNT-13015 Some Transformer tests failing in JDK8 - TransformerDebug was listing unsupported transformers in different ways in Java 7 & 8. Had no impact on usage, but broke a test. - Fixed a logic error highlighted by the switch to Java 8 in 5.1 to do with the default supported or unsupported values if there are some supported or unsupported properties specified, but the mimetype transformation being checked was not one of them. I don't think this will have come up causing any problems with the standard configuration defined in transformations.properties, but might in customisations created by customers, which is why this has been committed to 4.2.N. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94886 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -113,12 +113,12 @@ public class TransformerConfigSupported extends TransformerPropertyNameExtractor
|
||||
if (supportedTransformations == null)
|
||||
{
|
||||
supportedTransformations = new DoubleMap<String, String, Boolean>(ANY, ANY);
|
||||
if (supported)
|
||||
{
|
||||
supportedSet = true;
|
||||
}
|
||||
}
|
||||
supportedTransformations.put(sourceMimetype, targetMimetype, supported);
|
||||
if (supported)
|
||||
{
|
||||
supportedSet = true;
|
||||
}
|
||||
}
|
||||
|
||||
boolean isSupported(String sourceMimetype, String targetMimetype)
|
||||
|
@@ -33,6 +33,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TreeMap;
|
||||
import java.util.TreeSet;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@@ -220,7 +221,7 @@ public class TransformerDebug
|
||||
}
|
||||
|
||||
@AlfrescoPublicApi
|
||||
private class UnavailableTransformer
|
||||
private class UnavailableTransformer implements Comparable<UnavailableTransformer>
|
||||
{
|
||||
private final String name;
|
||||
private final String priority;
|
||||
@@ -262,6 +263,12 @@ public class TransformerDebug
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(UnavailableTransformer o)
|
||||
{
|
||||
return name.compareTo(o.name);
|
||||
}
|
||||
}
|
||||
|
||||
private final NodeService nodeService;
|
||||
@@ -385,7 +392,7 @@ public class TransformerDebug
|
||||
boolean debug = (maxSourceSizeKBytes != 0);
|
||||
if (frame.unavailableTransformers == null)
|
||||
{
|
||||
frame.unavailableTransformers = new HashSet<UnavailableTransformer>();
|
||||
frame.unavailableTransformers = new TreeSet<UnavailableTransformer>();
|
||||
}
|
||||
String priority = gePriority(transformer, sourceMimetype, targetMimetype);
|
||||
frame.unavailableTransformers.add(new UnavailableTransformer(name, priority, maxSourceSizeKBytes, debug));
|
||||
|
Reference in New Issue
Block a user