Roy Teeuwen created SLING-7130:
----------------------------------
Summary: ResourceChangeListener does not work correctly when using
ADDED on a glob path
Key: SLING-7130
URL: https://issues.apache.org/jira/browse/SLING-7130
Project: Sling
Issue Type: Bug
Reporter: Roy Teeuwen
Attachments: test-project-sling-observation.zip
When adding a resource change listener to a glob pattern, where only the
"ADDED" change type is used, it does not catch the added resource events
I have added a test project to illustrate the bug:
TestAResourceChangeListener: Uses the glob pattern glob:/**/test-a on ADDED,
and will not log the resource added event
TestBResourceChangeListener: Uses the glob pattern glob:/**/test-b on ADDED and
CHANGED, and will log both the resource added and change events
I have noticed that there is a workaround, and that is by adding a * at the end
of the glob path, as follows: "glob:/**/test-a*". After this it does correctly
catch the ADDED event.
I tried debugging the code, but I'm fairly sure that the bug lies in the Oak
Observation implementation, so I'm not sure if I should log the bug here or at
Oak, or maybe both?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)