- users-subscr...@sling.apache.org + users@sling.apache.org Thanks, Anshika Agarwal
On Tue, Sep 13, 2016 at 1:25 PM, Anshika Agarwal <anshikagar...@gmail.com> wrote: > Hi, > > This is regarding a handler manager present in the following artifact : > > <groupId>org.apache.sling</groupId> > <artifactId>org.apache.sling.jcr.webdav</artifactId> > <version>2.3.4</version> > > The SlingHandlerManager.java returns to jackrabbit.server.io, the list of > Handler implementations present against a Managed Type (IO, Delete, Copy, > etc.). See [1]. This list of handlers are ordered in ascending order of > their rankings and jackrabbit iterates through them to identify which one > to call based on which first implementation is willing to handle the > functionality. See [2]. So in effect, the lowest ranked service get the > chance to process first. > > In contradiction, the sling documentation states that it should be that > higher ranking is given preference over lower one. See [3] > > To me this looks like a bug in sling. Please confirm the same so that I > can log a bug on sling. > IMO instead of calling handlerServices.entrySet() to update entries in > SlingHandlerManager, issuing handlerServices.descendingMap().entrySet() should > do the trick. Please let me know if you see concerns in this fix. One that > I see is that it will impact all the components relying on this handler > manager since they would currently be assuming the ascending order to work > correctly. Thoughts? > > I have seen a similar bug in a different context @ [4] so explicitly > adding Felix Meschberger, Carsten Ziegeler, Bertrand Delacretaz for your > inputs. > > -- > Thanks, > Anshika Agarwal > > [1] : https://github.com/apache/sling/blob/trunk/bundles/jcr/ > webdav/src/main/java/org/apache/sling/jcr/webdav/impl/ > handler/SlingHandlerManager.java#L53 > [2] : https://github.com/apache/jackrabbit/blob/trunk/ > jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ > IOManagerImpl.java#L101 > [3] : http://sling.apache.org/documentation/the-sling-engine/filters.html > [4] : https://issues.apache.org/jira/browse/SLING-2920 > > -- Anshika Agarwal