[357426] org/eclipse/wst/server/core/internal/ServerNotificationManager bitwise kind check is incorrect
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerEvent.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerEvent.java
index 9cea0e2..892dd7a 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerEvent.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerEvent.java
@@ -224,9 +224,9 @@
* <p>
* This kind can be used to test whether this event is a server event or module event by using
* the following code (the example is checking for the server event):
- * ((getKind() | SERVER_CHANGE) != 0)
+ * ((getKind() & SERVER_CHANGE) != 0)
* the following code (the example is checking for the module event):
- * ((getKind() | MODULE_CHANGE) != 0)
+ * ((getKind() & MODULE_CHANGE) != 0)
*
* @return the kind of the change (<code>XXX_CHANGE</code>
* constants declared on {@link ServerEvent}
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerNotificationManager.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerNotificationManager.java
index 7f24187..2066476 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerNotificationManager.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerNotificationManager.java
@@ -108,7 +108,9 @@
boolean isTypeMatch = ((mask & eventKind & ServerEvent.SERVER_CHANGE) != 0)
|| ((mask & eventKind & ServerEvent.MODULE_CHANGE) != 0);
// check the kind of change
- boolean isKindMatch = (mask & eventKind ^ ServerEvent.SERVER_CHANGE ^ ServerEvent.MODULE_CHANGE) != 0;
+ // take out the ServerEvent.SERVER_CHANGE bit and ServerEvent.MODULE_CHANGE bit
+ int kindOnly = (eventKind | ServerEvent.SERVER_CHANGE | ServerEvent.MODULE_CHANGE) ^ ServerEvent.SERVER_CHANGE ^ ServerEvent.MODULE_CHANGE;
+ boolean isKindMatch = (mask & kindOnly) != 0;
if (isTypeMatch && isKindMatch) {
if (Trace.FINEST) {