Skip to content

Commit

Permalink
Fixed occasional "NullPointerException" occurring when using the expe…
Browse files Browse the repository at this point in the history
…riment engine
  • Loading branch information
DavidBerdik committed Apr 14, 2019
1 parent a1f7810 commit 1bc028c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/jgaap/backend/ExperimentEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public String call() throws Exception {
Path filePath = FileSystems.getDefault().getPath(fileName);
Writer writer = Files.newBufferedWriter(filePath, Charset.defaultCharset(), StandardOpenOption.CREATE);
for (Document resultDocument : resultDocuments) {
if (!resultDocument.getFormattedResult(analysisDriver).equals("null"))
if (resultDocument.getFormattedResult(analysisDriver) != null && !resultDocument.getFormattedResult(analysisDriver).equals("null"))
writer.append(resultDocument.getFormattedResult(analysisDriver));
}
writer.close();
Expand Down

0 comments on commit 1bc028c

Please sign in to comment.