Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2009-10-20 12:40:32 +0000
committerEike Stepper2009-10-20 12:40:32 +0000
commita6c9dbf092072d10d44fa522414d7cffac9172d1 (patch)
treed9f936af45b2bb4f8f0383785ca98eb96f7eea50 /plugins/org.eclipse.net4j.buddies.chat
parentc0237b4d53ce950b0312327916143015b9d9659a (diff)
downloadcdo-a6c9dbf092072d10d44fa522414d7cffac9172d1.tar.gz
cdo-a6c9dbf092072d10d44fa522414d7cffac9172d1.tar.xz
cdo-a6c9dbf092072d10d44fa522414d7cffac9172d1.zip
[292736] Optimize IListener management and notification
https://bugs.eclipse.org/bugs/show_bug.cgi?id=292736
Diffstat (limited to 'plugins/org.eclipse.net4j.buddies.chat')
-rw-r--r--plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/Chat.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/Chat.java b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/Chat.java
index 91612fd387..13fe6452ed 100644
--- a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/Chat.java
+++ b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/Chat.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Eike Stepper - initial API and implementation
*/
@@ -14,6 +14,7 @@ import org.eclipse.net4j.buddies.chat.IChat;
import org.eclipse.net4j.buddies.chat.IComment;
import org.eclipse.net4j.buddies.common.IMessage;
import org.eclipse.net4j.buddies.spi.common.Facility;
+import org.eclipse.net4j.util.event.IListener;
import java.util.ArrayList;
import java.util.List;
@@ -62,6 +63,10 @@ public class Chat extends Facility implements IChat
comments.add(comment);
}
- fireEvent(new CommentEvent(this, comment));
+ IListener[] listeners = getListeners();
+ if (listeners != null)
+ {
+ fireEvent(new CommentEvent(this, comment), listeners);
+ }
}
}

Back to the top