OpenJPA
  1. OpenJPA
  2. OPENJPA-403

LoadFetchGroup patch (OPENJPA-370) introduces NPE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker 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.

        Issue Links

          Activity

          Patrick Linskey created issue -
          Patrick Linskey made changes -
          Field Original Value New Value
          Summary LoadFetchGroup patch (OPEONJPA-370) introduces NPE LoadFetchGroup patch (OPENJPA-370) introduces NPE
          Priority Major [ 3 ] Blocker [ 1 ]
          Teresa Kan made changes -
          Attachment OPENJPA-403.patch [ 12367952 ]
          Kevin Sutter made changes -
          Assignee Patrick Linskey [ pcl ]
          Kevin Sutter made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Kevin Sutter made changes -
          Link This issue relates to OPENJPA-370 [ OPENJPA-370 ]
          Donald Woods made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development