DefaultExecutor.setExitValues(null) throws NullPointerException
---------------------------------------------------------------
Key: EXEC-43
URL: https://issues.apache.org/jira/browse/EXEC-43
Project: Commons Exec
Issue Type: Bug
Environment: WinXP SP3, JDK 1.5.0_17
Reporter: Matt P
Setting no checking of exit codes as per javadocs for DefaultExecutor results
in NullPointerException:
DefaultExecutor executor = new
DefaultExecutor();
executor.setExitValues(null );
throws:
java.lang.NullPointerException
at
org.apache.commons.exec.DefaultExecutor.setExitValues(DefaultExecutor.java:201)
even though javadocs say:
*setExitValues*
public void setExitValues(int[] values)
Description copied from interface: Executor
Define the exit code of the process to considered successful. The caller can
pass one of the following values
- an array of exit values to be considered successful
- an empty array for auto-detect of successful exit codes
- *null to indicate to skip checking of exit codes*
Specified by:
setExitValues in interface Executor
Parameters:
values - a list of the exit codes
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.