Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-403

LoadFetchGroup patch (OPENJPA-370) introduces NPE

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.0.1, 1.1.0
    • Fix Version/s: 1.0.1, 1.1.0
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pcl Patrick Linskey
                Reporter:
                pcl Patrick Linskey
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: