Fix PY-19610 Notebook validation failed
authorValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Tue, 13 Sep 2016 12:14:24 +0000 (15:14 +0300)
committerValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Wed, 28 Sep 2016 11:36:06 +0000 (14:36 +0300)
python/ipnb/src/org/jetbrains/plugins/ipnb/format/cells/IpnbCodeCell.java
python/ipnb/src/org/jetbrains/plugins/ipnb/format/cells/IpnbEditableCell.java

index 1e9295e6c36615b15cfcdd850e0f8371a42ef8de..f18487c2a821f0c9fd3c57b1b370b71f7adddbc3 100644 (file)
@@ -17,7 +17,7 @@ public class IpnbCodeCell extends IpnbEditableCell {
                       @NotNull final List<String> input,
                       @Nullable final Integer number,
                       @NotNull final List<IpnbOutputCell> cellOutputs,
-                      @Nullable Map<String, Object> metadata) {
+                      @NotNull Map<String, Object> metadata) {
     super(input, metadata);
     myLanguage = language;
     myPromptNumber = number;
index 52914fa2c61c79332b9f6bc76350e7287b567ced..9709befe6e5c6ef56f1ddd76a15e64c9ec0bda37 100644 (file)
@@ -2,16 +2,15 @@ package org.jetbrains.plugins.ipnb.format.cells;
 
 import com.intellij.openapi.util.text.StringUtil;
 import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
 
 import java.util.List;
 import java.util.Map;
 
 public abstract class IpnbEditableCell implements IpnbCell {
   @NotNull private List<String> mySource;
-  @Nullable Map<String, Object> myMetadata;
+  @NotNull Map<String, Object> myMetadata;
 
-  IpnbEditableCell(@NotNull final List<String> source, @Nullable Map<String, Object> metadata) {
+  IpnbEditableCell(@NotNull final List<String> source, @NotNull Map<String, Object> metadata) {
     mySource = source;
     myMetadata = metadata;
   }
@@ -30,7 +29,7 @@ public abstract class IpnbEditableCell implements IpnbCell {
     return StringUtil.join(mySource, "");
   }
 
-  @Nullable
+  @NotNull
   public Map<String, Object> getMetadata() {
     return myMetadata;
   }