mkalen 2005/03/14 22:10:15
Modified: src/java/org/apache/ojb/broker Identity.java
Log:
Merge with OJB_1_0_RELEASE branch: Add missing throw of createException.
Revision Changes Path
1.41 +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.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- Identity.java 19 Feb 2005 18:29:30 -0000 1.40
+++ Identity.java 15 Mar 2005 06:10:15 -0000 1.41
@@ -150,25 +150,22 @@
// 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);
}
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]