Protect against NPE when content type is missing

This commit is contained in:
Tom Morris 2016-03-22 15:24:49 -04:00
parent 4c664a712c
commit 5d45566455

View File

@ -313,7 +313,7 @@ public class ImportingUtilities {
} }
JSONUtilities.safePut(fileRecord, "declaredEncoding", encoding); JSONUtilities.safePut(fileRecord, "declaredEncoding", encoding);
String contentType = null; String contentType = null;
if (entity.getContentType().getValue() != null) { if (entity.getContentType() != null) {
contentType = entity.getContentType().getValue(); contentType = entity.getContentType().getValue();
} }
JSONUtilities.safePut(fileRecord, "declaredMimeType", contentType); JSONUtilities.safePut(fileRecord, "declaredMimeType", contentType);