Skip to content
Permalink
Browse files

Fixed occasional "NullPointerException" occurring when using the expe…

…riment engine
  • Loading branch information...
DavidBerdik committed Apr 14, 2019
1 parent a1f7810 commit 1bc028c7a3507bdfa73d04344b8822c6ae2a62cd
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/com/jgaap/backend/ExperimentEngine.java
@@ -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();

0 comments on commit 1bc028c

Please sign in to comment.
You can’t perform that action at this time.