Fix after fixing migration from v3eap to v3: add ability to remove hints from answer...
authorValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Mon, 1 Aug 2016 15:06:31 +0000 (18:06 +0300)
committerValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Mon, 1 Aug 2016 15:06:31 +0000 (18:06 +0300)
python/educational-core/student/src/com/jetbrains/edu/learning/courseFormat/AnswerPlaceholder.java

index 08866e92a19f72db57dbfab92daece3571953622..446987024d65f83ddb498942d9e9325919d8cbc4 100644 (file)
@@ -191,9 +191,14 @@ public class AnswerPlaceholder {
 
   @Transient
   public void setHints(@NotNull final List<String> hints) {
-    if (hints.isEmpty()) return;
-    myHint = hints.get(0);
-    myAdditionalHints = hints.subList(1, hints.size());
+    if (hints.isEmpty()) {
+      myHint = "";
+      myAdditionalHints.clear();
+    }
+    else {
+      myHint = hints.get(0);
+      myAdditionalHints = hints.subList(1, hints.size());
+    }
   }
 
   public void setHintByIndex(int i, @NotNull final String text) {