db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r492880 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
Date Fri, 05 Jan 2007 03:05:43 GMT
Author: arminw
Date: Thu Jan  4 19:05:42 2007
New Revision: 492880

URL: http://svn.apache.org/viewvc?view=rev&rev=492880
Log:
add log message when try to delete 'null'

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java?view=diff&rev=492880&r1=492879&r2=492880
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
Thu Jan  4 19:05:42 2007
@@ -96,11 +96,6 @@
  * and allows to store and retrieve arbitrary objects in/from relational
  * databases accessed by JDBC.
  *
- * @author <a href="mailto:thma@apache.org">Thomas Mahler<a>
- * @author <a href="mailto:leandro@ibnetwork.com.br">Leandro Rodrigo Saad Cruz<a>
- * @author <a href="mailto:mattbaird@yahoo.com">Matthew Baird<a>
- * @author <a href="mailto:jbraeuchi@gmx.ch">Jakob Braeuchi</a>
- *
  * @version $Id$
  */
 public class PersistenceBrokerImpl extends PersistenceBrokerAbstractImpl implements PBState
@@ -563,6 +558,11 @@
      */
     public void delete(Object obj, boolean ignoreReferences) throws PersistenceBrokerException
     {
+        if(obj == null)
+        {
+            logger.warn("Specified object to delete is 'null' --> return immediately");
+            return;
+        }
         doTxCheck();
         try
         {
@@ -579,6 +579,11 @@
     public void delete(Object obj, Identity oid, ClassDescriptor cld, boolean ignoreReferences)
             throws PersistenceBrokerException
     {
+        if(obj == null)
+        {
+            logger.warn("Object to delete is 'null' --> return immediately");
+            return;
+        }
         doTxCheck();
         try
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message