Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 91975 invoked from network); 5 Apr 2006 09:00:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Apr 2006 09:00:44 -0000 Received: (qmail 85012 invoked by uid 500); 5 Apr 2006 09:00:44 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 84810 invoked by uid 500); 5 Apr 2006 09:00:43 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 84799 invoked by uid 99); 5 Apr 2006 09:00:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Apr 2006 02:00:42 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [217.24.207.26] (HELO mail.seitenbau.net) (217.24.207.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Apr 2006 02:00:41 -0700 Received: from [192.168.15.18] (helo=www.seitenbau.net) by router.seitenbau.net with esmtp (Exim 4.43) id 1FR3sB-0001eA-Id for torque-user@db.apache.org; Wed, 05 Apr 2006 11:00:19 +0200 In-Reply-To: <4432E3E7.4020904@midsouth.rr.com> Subject: RE: NPE in Criteria.hashCode() To: "Apache Torque Users List" X-Mailer: Lotus Notes Release 6.5 September 26, 2003 Message-ID: From: Thomas Fischer Date: Wed, 5 Apr 2006 11:00:18 +0200 X-MIMETrack: Serialize by Router on www/seitenbau(Release 7.0.1|January 17, 2006) at 05.04.2006 11:00:19 AM MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a bug, which needs fixing in Torque's source code. Could you please create an entry in Torque's bug tracker ? Thanks, Thomas Christopher Fitch schrieb am 04.04.2006 23:23:51: > Hello, > I just discovered an issue with the org.apache.torque.util.Criteria > class. > > Apologies if this is the incorrect list to mention this. > > Version info: Torque 3.2 > When a call to hashCode() is made, a NullPointerException is thrown. > > Here's a very simple app that demonstrates the problem: > > >>>>> Begin CriteriaNPE.java > package torque_test; > > import org.apache.torque.util.Criteria; > > public class CriteriaNPE > { > public static void main(String[] args) > { > try > { > Criteria c = new Criteria(); > System.out.println("Criteria hashcode(1): "+c.hashCode()); > } > catch (Exception ex) > { > ex.printStackTrace(); > } > try > { > Criteria c = new Criteria(); > c.add("Blah","Blah"); > System.out.println("Criteria hashcode(2): "+c.hashCode()); > } > catch (Exception ex) > { > ex.printStackTrace(); > } > } > } > <<<<< End CriteriaNPE.java > > Output returned: > java.lang.NullPointerException > at org.apache.torque.util.Criteria.hashCode(Criteria.java:1881) > at torque_test.CriteriaNPE.main(CriteriaNPE.java:12) > java.lang.NullPointerException > at org.apache.torque.util.Criteria.hashCode(Criteria.java:1881) > at torque_test.CriteriaNPE.main(CriteriaNPE.java:22) > > > The prior implementation from 3.1.1 used to function correctly. Now the > above example is contrived, but I run in to the same issue with code > that worked on 3.1.1. In that case, the failure occurs in > Criteria.java at line 1887: > result = 37 * result + joins.hashCode(); > > because the variable joins is null. > > Thanks for any help in advance! > > -- > Christopher Fitch - dominatr@midsouth.rr.com > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org