Skip to content

Commit 1bc028c

Browse files
committed
Fixed occasional "NullPointerException" occurring when using the experiment engine
1 parent a1f7810 commit 1bc028c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com/jgaap/backend/ExperimentEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public String call() throws Exception {
253253
Path filePath = FileSystems.getDefault().getPath(fileName);
254254
Writer writer = Files.newBufferedWriter(filePath, Charset.defaultCharset(), StandardOpenOption.CREATE);
255255
for (Document resultDocument : resultDocuments) {
256-
if (!resultDocument.getFormattedResult(analysisDriver).equals("null"))
256+
if (resultDocument.getFormattedResult(analysisDriver) != null && !resultDocument.getFormattedResult(analysisDriver).equals("null"))
257257
writer.append(resultDocument.getFormattedResult(analysisDriver));
258258
}
259259
writer.close();

0 commit comments

Comments
 (0)