Return-Path: Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 81321 invoked by uid 500); 17 Jun 2003 17:52:16 -0000 Received: (qmail 81299 invoked from network); 17 Jun 2003 17:52:15 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 17 Jun 2003 17:52:15 -0000 Received: (qmail 36043 invoked by uid 1524); 17 Jun 2003 17:52:14 -0000 Date: 17 Jun 2003 17:52:14 -0000 Message-ID: <20030617175214.36042.qmail@icarus.apache.org> From: thma@apache.org To: db-ojb-cvs@apache.org Subject: cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer CollectionProxy.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N thma 2003/06/17 10:52:14 Modified: src/java/org/apache/ojb/broker/accesslayer CollectionProxy.java Log: applying Olli's high performance patch! Revision Changes Path 1.20 +11 -7 db-ojb/src/java/org/apache/ojb/broker/accesslayer/CollectionProxy.java Index: CollectionProxy.java =================================================================== RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/CollectionProxy.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- CollectionProxy.java 2 May 2003 18:10:15 -0000 1.19 +++ CollectionProxy.java 17 Jun 2003 17:52:13 -0000 1.20 @@ -135,12 +135,16 @@ { try { - Collection result = (Collection) getCollectionClass().newInstance(); - if (!isEmpty()) - { - result = (Collection)getBroker().getCollectionByQuery(getCollectionClass(),getQuery()); - } - return result; + Collection result; + if (m_size != 0) + { + result = (Collection) getBroker().getCollectionByQuery(getCollectionClass(),getQuery()); + } + else + { + result = (Collection) getCollectionClass().newInstance(); + } + return result; } catch (Exception ex) {