External Execution actors generates exception for empty directory
If the directory parameter is empty for the External Execution actor, a NullPointerException is generated:
It would be better to default to user.dir or throw an exception saying directory must be specified.
#1 Updated by Christopher Brooks over 4 years ago
- % Done changed from 0 to 90
This is fixed.
ptolemy.actor.lib.Exec invokes java.lang.Runtime.exec(), which takes as its last argument the directory. The Javadoc for Runtime.exec() state that if the directory is null, then the current directory of the parent process is used.
I fixed up Exec.java to handle the directory being the empty string, which means that a null gets passed to Runtime.exec().
I updated the documentation for the class and changed ptolemy/actor/lib/test/auto/Exec.xml so that the directory parameter is the empty string, which tickles this bug.
This bug may be closed after someone else confirms that it is fixed.