[java-identity-provider] branch main updated: IDP-1660 Make IdPAttributeValue implement Comparable<IdPAttributeValue>

Rod Widdowson rdw at steadingsoftware.com
Tue Sep 1 08:51:01 UTC 2020


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=bb9cdb8091086648c8b4fd58d800644032983ff6

The following commit(s) were added to refs/heads/main by this push:
       new  bb9cdb809 IDP-1660 Make IdPAttributeValue implement Comparable<IdPAttributeValue>
bb9cdb809 is described below

commit bb9cdb8091086648c8b4fd58d800644032983ff6
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Sep 1 09:46:03 2020 +0100

    IDP-1660 Make IdPAttributeValue implement Comparable<IdPAttributeValue>
    
    https://issues.shibboleth.net/jira/browse/IDP-1660
---
 .../main/java/net/shibboleth/idp/attribute/IdPAttributeValue.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttributeValue.java b/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttributeValue.java
index 5d0bdac40..31eef6431 100644
--- a/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttributeValue.java
+++ b/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttributeValue.java
@@ -34,7 +34,7 @@ import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
  * only the head part of the value for getValue().
  * </p>
  */
-public interface IdPAttributeValue {
+public interface IdPAttributeValue extends Comparable<IdPAttributeValue> {
 
     /**
      * Get the native representation of the value of this attribute.
@@ -50,4 +50,10 @@ public interface IdPAttributeValue {
      */
     @Nonnull @NotEmpty String getDisplayValue();
     
+    /** {@inheritDoc} */
+    default int compareTo(IdPAttributeValue value) {
+        return getDisplayValue().compareTo(value.getDisplayValue());
+    }
+
+    
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list