svn commit: r492880 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java

[email protected]
Newsgroups gmane.comp.jakarta.ojb.devel
Message-ID <[email protected]>
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:[email protected]">Thomas Mahler<a>
- * @author <a href="mailto:[email protected]">Leandro Rodrigo Saad Cruz<a>
- * @author <a href="mailto:[email protected]">Matthew Baird<a>
- * @author <a href="mailto:[email protected]">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
         {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.