Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 49703 invoked from network); 18 Oct 2007 15:26:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Oct 2007 15:26:44 -0000 Received: (qmail 89072 invoked by uid 500); 18 Oct 2007 15:26:31 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 89036 invoked by uid 500); 18 Oct 2007 15:26:31 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 89006 invoked by uid 99); 18 Oct 2007 15:26:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Oct 2007 08:26:31 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Oct 2007 15:26:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A4EE6714244 for ; Thu, 18 Oct 2007 08:25:51 -0700 (PDT) Message-ID: <5800017.1192721151673.JavaMail.jira@brutus> Date: Thu, 18 Oct 2007 08:25:51 -0700 (PDT) From: "Teresa Kan (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-403) LoadFetchGroup patch (OPENJPA-370) introduces NPE In-Reply-To: <25067073.1192477790552.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Teresa Kan updated OPENJPA-403: ------------------------------- Attachment: OPENJPA-403.patch The 1.0.x branches need to be sync up with the 1.1.0 trunk.. > 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 > > Attachments: OPENJPA-403.patch > > > 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.