Return-Path: Delivered-To: apmail-db-ojb-dev-archive@www.apache.org Received: (qmail 66954 invoked from network); 22 Apr 2004 19:23:47 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 22 Apr 2004 19:23:47 -0000 Received: (qmail 13826 invoked by uid 500); 22 Apr 2004 19:23:36 -0000 Delivered-To: apmail-db-ojb-dev-archive@db.apache.org Received: (qmail 13796 invoked by uid 500); 22 Apr 2004 19:23:35 -0000 Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "OJB Developers List" Reply-To: "OJB Developers List" Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 13783 invoked by uid 500); 22 Apr 2004 19:23:35 -0000 Received: (qmail 13778 invoked from network); 22 Apr 2004 19:23:35 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 22 Apr 2004 19:23:35 -0000 Received: (qmail 66930 invoked by uid 1513); 22 Apr 2004 19:23:45 -0000 Date: 22 Apr 2004 19:23:45 -0000 Message-ID: <20040422192345.66929.qmail@minotaur.apache.org> From: brj@apache.org To: db-ojb-cvs@apache.org Subject: cvs commit: db-ojb/src/java/org/apache/ojb/broker/util BrokerHelper.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N brj 2004/04/22 12:23:45 Modified: src/java/org/apache/ojb/broker/util BrokerHelper.java Log: fixed NPE when criteria is null Revision Changes Path 1.49 +8 -3 db-ojb/src/java/org/apache/ojb/broker/util/BrokerHelper.java Index: BrokerHelper.java =================================================================== RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/BrokerHelper.java,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- BrokerHelper.java 21 Apr 2004 17:02:59 -0000 1.48 +++ BrokerHelper.java 22 Apr 2004 19:23:45 -0000 1.49 @@ -505,9 +505,14 @@ { Class searchClass = aQuery.getSearchClass(); ReportQueryByCriteria countQuery; - // BRJ: copied Criteria without groupby, orderby, and prefetched relationships - Criteria countCrit = aQuery.getCriteria().copy(false,false,false); + Criteria countCrit = null; String[] columns = new String[1]; + + // BRJ: copied Criteria without groupby, orderby, and prefetched relationships + if (aQuery.getCriteria() != null) + { + countCrit = aQuery.getCriteria().copy(false,false,false); + } if(aQuery.isDistinct()) { --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For additional commands, e-mail: ojb-dev-help@db.apache.org