openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Teresa Kan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-403) LoadFetchGroup patch (OPENJPA-370) introduces NPE
Date Thu, 18 Oct 2007 15:25:51 GMT

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

Teresa Kan updated OPENJPA-403:
-------------------------------

    Attachment: OPENJPA-403.patch

The 1.0.x branches need to be sync up with the 1.1.0 trunk..


> LoadFetchGroup patch (OPENJPA-370) introduces NPE
> -------------------------------------------------
>
>                 Key: OPENJPA-403
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-403
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.0.1, 1.1.0
>            Reporter: Patrick Linskey
>            Priority: Blocker
>             Fix For: 1.0.1, 1.1.0
>
>         Attachments: OPENJPA-403.patch
>
>
> From the patch:
>             // post process for the fetchGroup: if there is a
>             // fetchgroup field, then go to the FetchConfiguration
>             // to get the required fetch fields.
>             if (fgs != null) {
>                 if (fields == null)
>                     fields = new BitSet(fmds.length);
>                 BitSet fgFields = fetch.requiresFetch(fgs, fmds);
>                 // merge the fetchgroup required fields to the original
>                 // fields only the fields are not already loaded and
>                 // are not in the original fields.
>                 for (int j = 0; j < fgFields.length(); j++) {
>                     if (fgFields.get(j) && !fields.get(j) && !_loaded.get(j))
>                         fields.set(j);
>                 }
>             }
> That code introduces an NPE if fetch is null. This is legal; see PNonTransState:108,
for example.

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


Mime
View raw message