Return-Path: Delivered-To: apmail-db-ojb-dev-archive@www.apache.org Received: (qmail 59440 invoked from network); 15 Mar 2005 06:06:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Mar 2005 06:06:36 -0000 Received: (qmail 63489 invoked by uid 500); 15 Mar 2005 06:06:35 -0000 Delivered-To: apmail-db-ojb-dev-archive@db.apache.org Received: (qmail 63459 invoked by uid 500); 15 Mar 2005 06:06: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 63446 invoked by uid 500); 15 Mar 2005 06:06:35 -0000 Received: (qmail 63442 invoked by uid 99); 15 Mar 2005 06:06:34 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 14 Mar 2005 22:06:34 -0800 Received: (qmail 59420 invoked by uid 1890); 15 Mar 2005 06:06:33 -0000 Date: 15 Mar 2005 06:06:33 -0000 Message-ID: <20050315060633.59419.qmail@minotaur.apache.org> From: mkalen@apache.org To: db-ojb-cvs@apache.org Subject: cvs commit: db-ojb/src/java/org/apache/ojb/broker Identity.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N mkalen 2005/03/14 22:06:33 Modified: src/java/org/apache/ojb/broker Tag: OJB_1_0_RELEASE Identity.java Log: Add missing throw of createException. Revision Changes Path No revision No revision 1.36.2.7 +8 -11 db-ojb/src/java/org/apache/ojb/broker/Identity.java Index: Identity.java =================================================================== RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/Identity.java,v retrieving revision 1.36.2.6 retrieving revision 1.36.2.7 diff -u -r1.36.2.6 -r1.36.2.7 --- Identity.java 13 Mar 2005 03:50:48 -0000 1.36.2.6 +++ Identity.java 15 Mar 2005 06:06:33 -0000 1.36.2.7 @@ -152,9 +152,9 @@ // conversion is done when binding the sql-statement BrokerHelper helper = targetBroker.serviceBrokerHelper(); ValueContainer[] pkValues = helper.getKeyValues(cld, objectToIdentify, false); - if(pkValues == null || pkValues.length == 0) + if (pkValues == null || pkValues.length == 0) { - createException("Can't extract PK value fields", objectToIdentify, null); + throw createException("Can't extract PK value fields", objectToIdentify, null); } m_pkValues = helper.extractValueArray(pkValues); } @@ -162,16 +162,13 @@ checkForPrimaryKeys(objectToIdentify); } + catch (ClassNotPersistenceCapableException e) + { + throw e; + } catch (Exception e) { - if(e instanceof ClassNotPersistenceCapableException) - { - throw (ClassNotPersistenceCapableException) e; - } - else - { - throw createException("Can not init Identity for given object.", objectToIdentify, e); - } + throw createException("Can not init Identity for given object.", objectToIdentify, e); } } --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For additional commands, e-mail: ojb-dev-help@db.apache.org