You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scout-dev@ws.apache.org by "David Jencks (JIRA)" <sc...@ws.apache.org> on 2009/07/23 21:08:15 UTC

[jira] Updated: (SCOUT-80) copying lists into arrays invites code errors such as NPEs

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

David Jencks updated SCOUT-80:
------------------------------

    Attachment: SCOUT-80.patch

Fixes NPE, fixes problem caused by SCOUT-43, suggests coding pattern, and may not conform to scout coding formatting guidelines.

> copying lists into arrays invites code errors such as NPEs
> ----------------------------------------------------------
>
>                 Key: SCOUT-80
>                 URL: https://issues.apache.org/jira/browse/SCOUT-80
>             Project: Scout
>          Issue Type: Bug
>          Components: Scout Implementation
>    Affects Versions: 1.1rc1
>            Reporter: David Jencks
>            Assignee: Kurt T Stam
>             Fix For: 1.1rc1
>
>         Attachments: SCOUT-80.patch
>
>
> I suspect as a result of updating to jaxb from xmlbeans, there is a lot of code like:
> List<Stuff> listOfStuff = jaxbObject.getListOfStuff();
> Stuff[] stuffArr = new Stuff[listOfStuff.size()];
> //sometimes, forget to copy in contents
> for (int i= 0; i < stuffArr.length; i++ ) {
> //NPE
> }
> well.... I only found one NPE but you get the idea.
> The attached patch fixes the NPE and updates some nearby code and reinstates a tck-required exception removed in SCOUT-43, presumably accidentally.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: scout-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: scout-dev-help@ws.apache.org