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

LoadFetchGroup patch (OPENJPA-370) introduces NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.0.1, 1.1.0
    • 1.0.1, 1.1.0
    • None
    • 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

        1. OPENJPA-403.patch
          0.8 kB
          Teresa Kan

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: