Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.slf4j.LoggerFactory;

import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;

/**
* Binded interpreters for a note
Expand Down Expand Up @@ -158,10 +159,15 @@ public void addCloneParagraph(Paragraph srcParagraph) {
Map<String, Object> config = new HashMap<>(srcParagraph.getConfig());
Map<String, Object> param = new HashMap<>(srcParagraph.settings.getParams());
Map<String, Input> form = new HashMap<>(srcParagraph.settings.getForms());
Gson gson = new Gson();
InterpreterResult result = gson.fromJson(
gson.toJson(srcParagraph.getReturn()),
InterpreterResult.class);
InterpreterResult result = null;
try {
Gson gson = new Gson();
result = gson.fromJson(
gson.toJson(srcParagraph.getReturn()),
InterpreterResult.class);
} catch (JsonSyntaxException e) {
// no-op
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does result == null cause problem to paragraph.setReturn?


newParagraph.setConfig(config);
newParagraph.settings.setParams(param);
Expand Down