openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabio Martelli <fabio.marte...@gmail.com>
Subject NullPointerException into JDBCStoreQuery
Date Tue, 04 Dec 2012 09:49:44 GMT
Hi All,
I'm working on a customization around slice (openjpa version 2.3.0-SNAPSHOT).
Checking two subsequent bulk deletes about the same object a NullPointerException will be
raised.

The exception has been retrieved at JDBCStoreQuery, row 527.
Considering that, in case of serialization,  the LifecycleEventManager can be null, is the
attached patch acceptable/applicable?

Please let me know what you think about.

Best regards,
F.

--- openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java	(revision
1415215)
+++ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java	(working
copy)
@@ -524,7 +524,7 @@
                 // execute in-memory so the callbacks are invoked
                 LifecycleEventManager mgr = ctx.getStoreContext().getBroker()
                     .getLifecycleEventManager();
-                if (mgr.hasDeleteListeners(null, mappings[i]))
+                if (mgr!=null && mgr.hasDeleteListeners(null, mappings[i]))
                     return null;
             }
         }





Mime
View raw message