SLING-12676 - Exception in initializing ResourceAccessSecurity with multiple ResourceAccessGate refs (#4)

This PR fixes the exception thrown while initializing ResourceAccessSecurity with multiple ResourceAccessGate refs

```
Caused by: java.lang.ClassCastException: class org.apache.sling.resourceaccesssecurity.impl.ResourceAccessGateHandler cannot be cast to class java.lang.Comparable (org.apache.sling.resourceaccesssecurity.impl.ResourceAccessGateHandler is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @45037a0c; java.lang.Comparable is in module java.base of loader 'bootstrap')
        at java.base/java.util.Collections$ReverseComparator.compare(Collections.java:5554)
        at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
        at java.base/java.util.TimSort.sort(TimSort.java:220)
        at java.base/java.util.Arrays.sort(Arrays.java:1308)
        at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:353)
        at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:261)
```
---------

Co-authored-by: Sagar Miglani <saga@adobe.com>
2 files changed
tree: 66be2f0693ffa94b913b7e97d50417d498124c4c
  1. src/
  2. .asf.yaml
  3. .gitignore
  4. bnd.bnd
  5. CODE_OF_CONDUCT.md
  6. CONTRIBUTING.md
  7. Jenkinsfile
  8. LICENSE
  9. pom.xml
  10. README.md
README.md

Apache Sling

Build Status Test Status Coverage Sonarcloud Status JavaDoc Maven Central License

Apache Sling Resource Access Security

This module is part of the Apache Sling project.

This bundle provides an implementation of the ResourceAccessSecurity service.