From 5d455664554774e49577490c1ea37d75b941d067 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Tue, 22 Mar 2016 15:24:49 -0400 Subject: [PATCH] Protect against NPE when content type is missing --- main/src/com/google/refine/importing/ImportingUtilities.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/com/google/refine/importing/ImportingUtilities.java b/main/src/com/google/refine/importing/ImportingUtilities.java index 922141c35..8e7438fe6 100644 --- a/main/src/com/google/refine/importing/ImportingUtilities.java +++ b/main/src/com/google/refine/importing/ImportingUtilities.java @@ -313,7 +313,7 @@ public class ImportingUtilities { } JSONUtilities.safePut(fileRecord, "declaredEncoding", encoding); String contentType = null; - if (entity.getContentType().getValue() != null) { + if (entity.getContentType() != null) { contentType = entity.getContentType().getValue(); } JSONUtilities.safePut(fileRecord, "declaredMimeType", contentType);