fix NPE appcode/163.2154 clion/163.2153
authorLiana Bakradze <liana.bakradze@jetbrains.com>
Tue, 2 Aug 2016 11:16:33 +0000 (14:16 +0300)
committerLiana Bakradze <liana.bakradze@jetbrains.com>
Tue, 2 Aug 2016 11:16:33 +0000 (14:16 +0300)
python/educational-core/student/src/com/jetbrains/edu/learning/StudySerializationUtils.java

index 805df68d4eb0f67f4907011f297551dbb0acd7e7..d0cd98e3c28cb959ce625ffc8580be22a7a725fc 100644 (file)
@@ -406,10 +406,9 @@ public class StudySerializationUtils {
           final JsonArray hintsArray = new JsonArray();
 
           try {
-            final Type listType = new TypeToken<List<String>>() {
-            }.getType();
+            final Type listType = new TypeToken<List<String>>() {}.getType();
             final List<String> hints = gson.fromJson(hintString, listType);
-            if (!hints.isEmpty()) {
+            if (hints != null && !hints.isEmpty()) {
               for (int i = 0; i < hints.size(); i++) {
                 if (i == 0) {
                   placeholderObject.addProperty(HINT, hints.get(0));