solomax commented on code in PR #144:
URL: https://github.com/apache/openjpa/pull/144#discussion_r3801752046


##########
openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java:
##########
@@ -2365,10 +2419,20 @@ public boolean is_systemListenersActivated() {
      * Add the given system lifecycle listener.
      */
     public void addSystemListener(Object listener) {
+        addSystemListener(listener, null);
+    }
+
+    /**
+     * Add a system lifecycle listener with an optional deduplication key.
+     * If a key is provided and a listener with the same key was already
+     * registered, the duplicate is silently skipped.
+     */
+    public void addSystemListener(Object listener, String key) {
+        if (key != null && !_systemListenerKeys.add(key)) {

Review Comment:
   Should be fixed with e44b47047
   @rzo1 please take a look at the fix (this seems to be your code ;)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to