openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey (JIRA)" <>
Subject [jira] Created: (OPENJPA-403) LoadFetchGroup patch (OPEONJPA-370) introduces NPE
Date Mon, 15 Oct 2007 19:49:50 GMT
LoadFetchGroup patch (OPEONJPA-370) introduces NPE

                 Key: OPENJPA-403
             Project: OpenJPA
          Issue Type: Bug
    Affects Versions: 1.0.1, 1.1.0
            Reporter: Patrick Linskey
             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))

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.

View raw message