[jira] Created: (EXEC-40) NPE in DefaultExecutor.setExitValues()

6 messages Options
Embed this post
Permalink
JIRA jira@apache.org

[jira] Created: (EXEC-40) NPE in DefaultExecutor.setExitValues()

Reply Threaded More More options
Print post
Permalink
NPE in DefaultExecutor.setExitValues()
--------------------------------------

                 Key: EXEC-40
                 URL: https://issues.apache.org/jira/browse/EXEC-40
             Project: Commons Exec
          Issue Type: Bug
         Environment: Ubuntu Linux, Sun Java 1.6.0_13
            Reporter: Peter Henderson


The setExitValues() of DefaultExecutor does not throws a NPE when passed a null argument.
The documentation says passing a null should disable exit value checking.

Solution, modify the body to correctly handle nulls.

    public void setExitValues(final int[] values) {
        if (values==null) {
            this.extiValues = null;
        } else {
            this.exitValues = (int[]) values.clone();
        }
    }


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Commented: (EXEC-40) NPE in DefaultExecutor.setExitValues()

Reply Threaded More More options
Print post
Permalink

    [ https://issues.apache.org/jira/browse/EXEC-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12722983#action_12722983 ]

Siegfried Goeschl commented on EXEC-40:
---------------------------------------

That is a bit embarrasing - introduced that when fixing Findbugs issues ... :-(

> NPE in DefaultExecutor.setExitValues()
> --------------------------------------
>
>                 Key: EXEC-40
>                 URL: https://issues.apache.org/jira/browse/EXEC-40
>             Project: Commons Exec
>          Issue Type: Bug
>         Environment: Ubuntu Linux, Sun Java 1.6.0_13
>            Reporter: Peter Henderson
>            Assignee: Siegfried Goeschl
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The setExitValues() of DefaultExecutor does not throws a NPE when passed a null argument.
> The documentation says passing a null should disable exit value checking.
> Solution, modify the body to correctly handle nulls.
>     public void setExitValues(final int[] values) {
> if (values==null) {
>             this.extiValues = null;
> } else {
>             this.exitValues = (int[]) values.clone();
>         }
>     }

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Updated: (EXEC-40) NPE in DefaultExecutor.setExitValues()

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/EXEC-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Siegfried Goeschl updated EXEC-40:
----------------------------------

    Fix Version/s: 1.1

> NPE in DefaultExecutor.setExitValues()
> --------------------------------------
>
>                 Key: EXEC-40
>                 URL: https://issues.apache.org/jira/browse/EXEC-40
>             Project: Commons Exec
>          Issue Type: Bug
>         Environment: Ubuntu Linux, Sun Java 1.6.0_13
>            Reporter: Peter Henderson
>            Assignee: Siegfried Goeschl
>             Fix For: 1.1
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The setExitValues() of DefaultExecutor does not throws a NPE when passed a null argument.
> The documentation says passing a null should disable exit value checking.
> Solution, modify the body to correctly handle nulls.
>     public void setExitValues(final int[] values) {
> if (values==null) {
>             this.extiValues = null;
> } else {
>             this.exitValues = (int[]) values.clone();
>         }
>     }

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Updated: (EXEC-40) NPE in DefaultExecutor.setExitValues()

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/EXEC-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Siegfried Goeschl updated EXEC-40:
----------------------------------

    Affects Version/s: 1.0
        Fix Version/s:     (was: 1.1)
                       1.0.1

> NPE in DefaultExecutor.setExitValues()
> --------------------------------------
>
>                 Key: EXEC-40
>                 URL: https://issues.apache.org/jira/browse/EXEC-40
>             Project: Commons Exec
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Ubuntu Linux, Sun Java 1.6.0_13
>            Reporter: Peter Henderson
>            Assignee: Siegfried Goeschl
>             Fix For: 1.0.1
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The setExitValues() of DefaultExecutor does not throws a NPE when passed a null argument.
> The documentation says passing a null should disable exit value checking.
> Solution, modify the body to correctly handle nulls.
>     public void setExitValues(final int[] values) {
> if (values==null) {
>             this.extiValues = null;
> } else {
>             this.exitValues = (int[]) values.clone();
>         }
>     }

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Resolved: (EXEC-40) NPE in DefaultExecutor.setExitValues()

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/EXEC-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Siegfried Goeschl resolved EXEC-40.
-----------------------------------

    Resolution: Fixed

Applied patch ages ago

> NPE in DefaultExecutor.setExitValues()
> --------------------------------------
>
>                 Key: EXEC-40
>                 URL: https://issues.apache.org/jira/browse/EXEC-40
>             Project: Commons Exec
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Ubuntu Linux, Sun Java 1.6.0_13
>            Reporter: Peter Henderson
>            Assignee: Siegfried Goeschl
>             Fix For: 1.0.1
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The setExitValues() of DefaultExecutor does not throws a NPE when passed a null argument.
> The documentation says passing a null should disable exit value checking.
> Solution, modify the body to correctly handle nulls.
>     public void setExitValues(final int[] values) {
> if (values==null) {
>             this.extiValues = null;
> } else {
>             this.exitValues = (int[]) values.clone();
>         }
>     }

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Commented: (EXEC-40) NPE in DefaultExecutor.setExitValues()

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/EXEC-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760541#action_12760541 ]

Will Dickson commented on EXEC-40:
----------------------------------

Many thanks. Would it be possible to issue the 1.0.1 release as a binary d/l?

> NPE in DefaultExecutor.setExitValues()
> --------------------------------------
>
>                 Key: EXEC-40
>                 URL: https://issues.apache.org/jira/browse/EXEC-40
>             Project: Commons Exec
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Ubuntu Linux, Sun Java 1.6.0_13
>            Reporter: Peter Henderson
>            Assignee: Siegfried Goeschl
>             Fix For: 1.0.1
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The setExitValues() of DefaultExecutor does not throws a NPE when passed a null argument.
> The documentation says passing a null should disable exit value checking.
> Solution, modify the body to correctly handle nulls.
>     public void setExitValues(final int[] values) {
> if (values==null) {
>             this.extiValues = null;
> } else {
>             this.exitValues = (int[]) values.clone();
>         }
>     }

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.