[java-opensaml] branch master updated: Add deprecation warnings and improve annotations.

Scott Cantor cantor.2 at osu.edu
Mon Dec 9 16:38:51 EST 2019


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

scantor pushed a commit to branch master
in repository java-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=2fddb638362360c43f05ab95d6f421086c293bef

The following commit(s) were added to refs/heads/master by this push:
       new  2fddb63   Add deprecation warnings and improve annotations.
2fddb63 is described below

commit 2fddb638362360c43f05ab95d6f421086c293bef
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Dec 9 15:38:48 2019 -0600

    Add deprecation warnings and improve annotations.
---
 .../saml/saml2/metadata/AdditionalMetadataLocation.java      | 12 ++++++++----
 .../org/opensaml/saml/saml2/metadata/AffiliateMember.java    | 10 ++++++----
 .../org/opensaml/saml/saml2/metadata/AttributeProfile.java   | 10 ++++++----
 .../main/java/org/opensaml/saml/saml2/metadata/Company.java  | 10 ++++++----
 .../java/org/opensaml/saml/saml2/metadata/EmailAddress.java  | 10 ++++++----
 .../java/org/opensaml/saml/saml2/metadata/GivenName.java     | 11 +++++++----
 .../java/org/opensaml/saml/saml2/metadata/NameIDFormat.java  | 10 ++++++----
 .../main/java/org/opensaml/saml/saml2/metadata/SurName.java  | 10 ++++++----
 .../org/opensaml/saml/saml2/metadata/TelephoneNumber.java    | 10 ++++++----
 9 files changed, 57 insertions(+), 36 deletions(-)

diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AdditionalMetadataLocation.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AdditionalMetadataLocation.java
index fff52b8..08940ce 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AdditionalMetadataLocation.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AdditionalMetadataLocation.java
@@ -26,6 +26,8 @@ import org.opensaml.saml.common.SAMLObject;
 import org.opensaml.saml.common.xml.SAMLConstants;
 
 import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
 
 /**
  * SAML 2.0 Metadata AdditionalMetadataLocation.
@@ -53,10 +55,11 @@ public interface AdditionalMetadataLocation extends SAMLObject, XSURI {
      * Gets the location URI.
      * 
      * @return the location URI
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     @Nullable default String getLocationURI() {
+        DeprecationSupport.warn(ObjectType.METHOD, "getLocationURI", AdditionalMetadataLocation.class.toString(),
+                "getURI");
         return getURI();
     }
 
@@ -64,10 +67,11 @@ public interface AdditionalMetadataLocation extends SAMLObject, XSURI {
      * Sets the location URI.
      * 
      * @param uri the location URI
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     default void setLocationURI(@Nullable final String uri) {
+        DeprecationSupport.warn(ObjectType.METHOD, "setLocationURI", AdditionalMetadataLocation.class.toString(),
+                "setURI");
         setURI(uri);
     }
 
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AffiliateMember.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AffiliateMember.java
index b6379b6..0047b79 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AffiliateMember.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AffiliateMember.java
@@ -26,6 +26,8 @@ import org.opensaml.saml.common.SAMLObject;
 import org.opensaml.saml.common.xml.SAMLConstants;
 
 import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
 
 /**
  * SAML 2.0 Metadata AffiliateMember.
@@ -50,10 +52,10 @@ public interface AffiliateMember extends SAMLObject, XSURI {
      * Gets the member's entity ID.
      * 
      * @return the member's ID
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     @Nullable default String getID() {
+        DeprecationSupport.warn(ObjectType.METHOD, "getID", AffiliateMember.class.toString(), "getURI");
         return getURI();
     }
 
@@ -61,10 +63,10 @@ public interface AffiliateMember extends SAMLObject, XSURI {
      * Sets the member's entity ID.
      * 
      * @param uri the member's ID
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     default void setID(@Nullable final String uri) {
+        DeprecationSupport.warn(ObjectType.METHOD, "setID", AffiliateMember.class.toString(), "setURI");
         setURI(uri);
     }
 
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AttributeProfile.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AttributeProfile.java
index ca0df21..a770c8f 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AttributeProfile.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AttributeProfile.java
@@ -26,6 +26,8 @@ import org.opensaml.saml.common.SAMLObject;
 import org.opensaml.saml.common.xml.SAMLConstants;
 
 import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
 
 /**
  * SAML 2.0 Metadata AttributeProfile.
@@ -43,10 +45,10 @@ public interface AttributeProfile extends SAMLObject, XSURI {
      * Gets the URI of this attribute profile.
      * 
      * @return the URI of this attribute profile
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     @Nullable default String getProfileURI() {
+        DeprecationSupport.warn(ObjectType.METHOD, "getProfileURI", AttributeProfile.class.toString(), "getURI");
         return getURI();
     }
 
@@ -54,10 +56,10 @@ public interface AttributeProfile extends SAMLObject, XSURI {
      * Sets the URI of this attribute profile.
      * 
      * @param uri the URI of this attribute profile
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     default void setProfileURI(@Nullable final String uri) {
+        DeprecationSupport.warn(ObjectType.METHOD, "setProfileURI", AttributeProfile.class.toString(), "setURI");
         setURI(uri);
     }
 }
\ No newline at end of file
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/Company.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/Company.java
index 622aab8..2d52835 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/Company.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/Company.java
@@ -26,6 +26,8 @@ import org.opensaml.saml.common.SAMLObject;
 import org.opensaml.saml.common.xml.SAMLConstants;
 
 import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
 
 /**
  * SAML 2.0 Metadata Company.
@@ -43,10 +45,10 @@ public interface Company extends SAMLObject, XSString {
      * Gets the name of the company.
      * 
      * @return the name of the company
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     @Nullable default String getName() {
+        DeprecationSupport.warn(ObjectType.METHOD, "getName", Company.class.toString(), "getValue");
         return getValue();
     }
 
@@ -54,10 +56,10 @@ public interface Company extends SAMLObject, XSString {
      * Sets the name of the company.
      * 
      * @param value the name of the company
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     default void setName(@Nullable final String value) {
+        DeprecationSupport.warn(ObjectType.METHOD, "setName", Company.class.toString(), "setValue");
         setValue(value);
     }
 }
\ No newline at end of file
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/EmailAddress.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/EmailAddress.java
index 34d8965..b23e2c1 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/EmailAddress.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/EmailAddress.java
@@ -26,6 +26,8 @@ import org.opensaml.saml.common.SAMLObject;
 import org.opensaml.saml.common.xml.SAMLConstants;
 
 import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
 
 /**
  * SAML 2.0 Metadata EmailAddress.
@@ -43,10 +45,10 @@ public interface EmailAddress extends SAMLObject, XSURI {
      * Gets the email address.
      * 
      * @return the email address
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     @Nullable default String getAddress() {
+        DeprecationSupport.warn(ObjectType.METHOD, "getAddress", EmailAddress.class.toString(), "getURI");
         return getURI();
     }
 
@@ -54,10 +56,10 @@ public interface EmailAddress extends SAMLObject, XSURI {
      * Sets the email address.
      * 
      * @param value email address
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     default void setAddress(@Nullable final String value) {
+        DeprecationSupport.warn(ObjectType.METHOD, "setAddress", EmailAddress.class.toString(), "setURI");
         setURI(value);
     }
     
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/GivenName.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/GivenName.java
index 1dedd1a..17d279e 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/GivenName.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/GivenName.java
@@ -26,6 +26,8 @@ import org.opensaml.saml.common.SAMLObject;
 import org.opensaml.saml.common.xml.SAMLConstants;
 
 import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
 
 /**
  * SAML 2.0 Metadata GivenName.
@@ -43,10 +45,10 @@ public interface GivenName extends SAMLObject, XSString {
      * Gets the name.
      * 
      * @return the name
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     @Nullable default String getName() {
+        DeprecationSupport.warn(ObjectType.METHOD, "getName", GivenName.class.toString(), "getValue");
         return getValue();
     }
 
@@ -54,10 +56,11 @@ public interface GivenName extends SAMLObject, XSString {
      * Sets the name.
      * 
      * @param value the name
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     default void setName(@Nullable final String value) {
+        DeprecationSupport.warn(ObjectType.METHOD, "setName", GivenName.class.toString(), "setValue");
         setValue(value);
     }
+    
 }
\ No newline at end of file
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/NameIDFormat.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/NameIDFormat.java
index 09f6e49..f0f1ef5 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/NameIDFormat.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/NameIDFormat.java
@@ -26,6 +26,8 @@ import org.opensaml.saml.common.SAMLObject;
 import org.opensaml.saml.common.xml.SAMLConstants;
 
 import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
 
 /**
  * SAML 2.0 Metadata NameIDFormat.
@@ -43,10 +45,10 @@ public interface NameIDFormat extends SAMLObject, XSURI {
      * Gets the format of the NameID.
      * 
      * @return the format of the NameID
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     @Nullable default String getFormat() {
+        DeprecationSupport.warn(ObjectType.METHOD, "getFormat", NameIDFormat.class.toString(), "getURI");
         return getURI();
     }
 
@@ -54,10 +56,10 @@ public interface NameIDFormat extends SAMLObject, XSURI {
      * Sets the format of the NameID.
      * 
      * @param uri the format of the NameID
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     default void setFormat(@Nullable final String uri) {
+        DeprecationSupport.warn(ObjectType.METHOD, "setFormat", NameIDFormat.class.toString(), "setURI");
         setURI(uri);
     }
     
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/SurName.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/SurName.java
index b596105..e19dc8d 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/SurName.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/SurName.java
@@ -26,6 +26,8 @@ import org.opensaml.saml.common.SAMLObject;
 import org.opensaml.saml.common.xml.SAMLConstants;
 
 import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
 
 /**
  * SAML 2.0 Metadata SurName.
@@ -43,10 +45,10 @@ public interface SurName extends SAMLObject, XSString {
      * Gets the name.
      * 
      * @return the name
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     @Nullable default String getName() {
+        DeprecationSupport.warn(ObjectType.METHOD, "getName", SurName.class.toString(), "getValue");
         return getValue();
     }
 
@@ -54,10 +56,10 @@ public interface SurName extends SAMLObject, XSString {
      * Sets the name.
      * 
      * @param value the name
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     default void setName(@Nullable final String value) {
+        DeprecationSupport.warn(ObjectType.METHOD, "setName", SurName.class.toString(), "setValue");
         setValue(value);
     }
     
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/TelephoneNumber.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/TelephoneNumber.java
index fb0fa1b..d93bc22 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/TelephoneNumber.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/TelephoneNumber.java
@@ -26,6 +26,8 @@ import org.opensaml.saml.common.SAMLObject;
 import org.opensaml.saml.common.xml.SAMLConstants;
 
 import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
 
 /**
  * SAML 2.0 Metadata TelephoneNumber.
@@ -43,10 +45,10 @@ public interface TelephoneNumber extends SAMLObject, XSString {
      * Gets the telephone number.
      * 
      * @return the telephone number
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     @Nullable default String getNumber() {
+        DeprecationSupport.warn(ObjectType.METHOD, "getNumber", TelephoneNumber.class.toString(), "getValue");
         return getValue();
     }
 
@@ -54,10 +56,10 @@ public interface TelephoneNumber extends SAMLObject, XSString {
      * Sets the telephone number.
      * 
      * @param value the telephone number
-     * 
-     * @deprecated
      */
+    @Deprecated(forRemoval=true, since="4.0.0")
     default void setNumber(@Nullable final String value) {
+        DeprecationSupport.warn(ObjectType.METHOD, "setNumber", TelephoneNumber.class.toString(), "setValue");
         setValue(value);
     }
     

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


More information about the commits mailing list