Skip to content

Commit 70992ea

Browse files
committed
Add null check to export model command.
1 parent 52f7cc1 commit 70992ea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/commands/ExportModelJsonCommandTask.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ public class ExportModelJsonCommandTask extends AbstractTask {
2424

2525
@Override
2626
public void run(TaskMonitor taskMonitor) throws Exception {
27+
if(file == null)
28+
throw new IllegalArgumentException("'file' argument is null");
29+
2730
file.createNewFile();
2831
if(!file.canWrite())
2932
throw new IllegalArgumentException("Cannot write to file");

0 commit comments

Comments
 (0)