You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:58:12 UTC

[sling-org-apache-sling-resourceaccesssecurity] 09/13: SLING-3930 - Service rankings from ResourceAccessGates are not properly handled

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.resourceaccesssecurity-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceaccesssecurity.git

commit b9285430cea4020828cd87b114213ad517ba63de
Author: Mike Müller <my...@apache.org>
AuthorDate: Sun Sep 14 10:02:54 2014 +0000

    SLING-3930 - Service rankings from ResourceAccessGates are not properly handled
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/resourceaccesssecurity/core@1624823 13f79535-47bb-0310-9956-ffa450edef68
---
 .../sling/resourceaccesssecurity/impl/ResourceAccessGateHandler.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/resourceaccesssecurity/impl/ResourceAccessGateHandler.java b/src/main/java/org/apache/sling/resourceaccesssecurity/impl/ResourceAccessGateHandler.java
index b064910..daa25bb 100644
--- a/src/main/java/org/apache/sling/resourceaccesssecurity/impl/ResourceAccessGateHandler.java
+++ b/src/main/java/org/apache/sling/resourceaccesssecurity/impl/ResourceAccessGateHandler.java
@@ -110,7 +110,8 @@ public class ResourceAccessGateHandler implements Comparable<ResourceAccessGateH
 
     @Override
     public int compareTo(final ResourceAccessGateHandler o) {
-        return this.reference.compareTo(o.reference);
+        // services with higher service ranking should be the first in a list
+        return -this.reference.compareTo(o.reference);
     }
 
     @Override

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.