-
Improvement
-
Resolution: Done
-
Neutral
-
5.3.10, 5.4
-
-
Empty show more show less
-
Basel 15
-
1
A customer got confused by the Javadoc of this parameter:
@param nodeTypes the node types to filter events for
It lead him to the assumption:
"Right now it says "nodeTypes the node types to filter events for" and we interpreted that to mean we'd only receive events for those node types, but actually it's the exact opposite."
The code of JCR using this parameter is:
org.apache.jackrabbit.core.observation.EventFilter.blocks(EventState)
To this code parts:
// check node types if (nodeTypes != null) { Set<NodeType> eventTypes = eventState.getNodeTypes(session.getNodeTypeManager()); boolean match = false; for (int i = 0; i < nodeTypes.length && !match; i++) { for (NodeType eventType : eventTypes) { NodeTypeImpl nodeType = (NodeTypeImpl) eventType; match |= nodeType.getQName().equals(nodeTypes[i].getQName()) || nodeType.isDerivedFrom(nodeTypes[i].getQName()); } } if (!match) { return true; } }
See support issue for further information.
Acceptance criteria