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


##########
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:
   Looks ok to me.



-- 
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