Index: core/src/main/java/org/springframework/osgi/service/importer/support/ServiceReferenceDelegate.java =================================================================== --- core/src/main/java/org/springframework/osgi/service/importer/support/ServiceReferenceDelegate.java (revision 13136) +++ core/src/main/java/org/springframework/osgi/service/importer/support/ServiceReferenceDelegate.java (working copy) @@ -58,4 +58,9 @@ public String toString() { return "ServiceReference wrapper for " + delegate.getServiceReference(); } + + public int compareTo(Object reference) { + return this.delegate.getServiceReference().compareTo( + (((ServiceReferenceDelegate) reference).delegate.getServiceReference())); + } } Index: core/src/main/java/org/springframework/osgi/service/importer/support/internal/aop/SwappingServiceReferenceProxy.java =================================================================== --- core/src/main/java/org/springframework/osgi/service/importer/support/internal/aop/SwappingServiceReferenceProxy.java (revision 13136) +++ core/src/main/java/org/springframework/osgi/service/importer/support/internal/aop/SwappingServiceReferenceProxy.java (working copy) @@ -80,4 +80,8 @@ public int hashCode() { return HASH_CODE + delegate.hashCode(); } + + public int compareTo(Object reference) { + return this.delegate.compareTo(((SwappingServiceReferenceProxy) reference).delegate); + } } Index: core/src/main/java/org/springframework/osgi/service/importer/support/internal/aop/StaticServiceReferenceProxy.java =================================================================== --- core/src/main/java/org/springframework/osgi/service/importer/support/internal/aop/StaticServiceReferenceProxy.java (revision 13136) +++ core/src/main/java/org/springframework/osgi/service/importer/support/internal/aop/StaticServiceReferenceProxy.java (working copy) @@ -81,4 +81,8 @@ public int hashCode() { return HASH_CODE + target.hashCode(); } + + public int compareTo(Object reference) { + return this.target.compareTo(((StaticServiceReferenceProxy) reference).target); + } }