MNT-16381 Transformers must validate the content stream mimetype

- Fix NPE in TransformerConfigImplTest

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@130143 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-09-05 20:03:27 +00:00
parent 4557b66f73
commit 905c97c8f8

View File

@@ -329,6 +329,8 @@ public class TransformerConfigImpl extends AbstractLifecycleBean implements Tran
Map<String, Set<String>> strictMimetypeExceptions = new HashMap<>(); Map<String, Set<String>> strictMimetypeExceptions = new HashMap<>();
String whitelist = getProperty(STRICT_MIMETYPE_CHECK_WHITELIST_MIMETYPES); String whitelist = getProperty(STRICT_MIMETYPE_CHECK_WHITELIST_MIMETYPES);
if (whitelist != null)
{
String[] mimetypes = whitelist.split(";"); String[] mimetypes = whitelist.split(";");
if (mimetypes.length % 2 != 0) if (mimetypes.length % 2 != 0)
@@ -363,6 +365,7 @@ public class TransformerConfigImpl extends AbstractLifecycleBean implements Tran
} }
} }
} }
}
return strictMimetypeExceptions; return strictMimetypeExceptions;
} }