You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Patrick Linskey (JIRA)" <ji...@apache.org> on 2007/10/15 21:51:50 UTC

[jira] Updated: (OPENJPA-403) LoadFetchGroup patch (OPENJPA-370) introduces NPE

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

Patrick Linskey updated OPENJPA-403:
------------------------------------

    Priority: Blocker  (was: Major)
     Summary: LoadFetchGroup patch (OPENJPA-370) introduces NPE  (was: LoadFetchGroup patch (OPEONJPA-370) introduces NPE)

> 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
>
>
> 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.