[java-opensaml] branch main updated: Add missing annotations.
Scott Cantor
cantor.2 at osu.edu
Thu Nov 17 19:40:41 UTC 2022
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=8f350f166c84406e3f8f7b0e36902576b5159dac
The following commit(s) were added to refs/heads/main by this push:
new 8f350f166 Add missing annotations.
8f350f166 is described below
commit 8f350f166c84406e3f8f7b0e36902576b5159dac
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Nov 17 14:40:04 2022 -0500
Add missing annotations.
---
.../context/AttributeConsumingServiceContext.java | 5 ++++-
.../saml/ext/saml2mdrpi/RegistrationInfo.java | 19 +++++++++++--------
.../saml2/metadata/AttributeConsumingService.java | 15 +++++++++------
.../saml/saml2/metadata/RequestedAttribute.java | 13 ++++++++-----
4 files changed, 32 insertions(+), 20 deletions(-)
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/AttributeConsumingServiceContext.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/AttributeConsumingServiceContext.java
index b8ed45519..95b7925f8 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/AttributeConsumingServiceContext.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/AttributeConsumingServiceContext.java
@@ -46,9 +46,12 @@ public final class AttributeConsumingServiceContext extends BaseContext {
*
* @param acs assertion to be validated
*
+ * @return this context
*/
- public void setAttributeConsumingService(@Nullable final AttributeConsumingService acs) {
+ @Nonnull public AttributeConsumingServiceContext setAttributeConsumingService(
+ @Nullable final AttributeConsumingService acs) {
attributeConsumingService = acs;
+ return this;
}
}
\ No newline at end of file
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/ext/saml2mdrpi/RegistrationInfo.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/ext/saml2mdrpi/RegistrationInfo.java
index 96752c144..1a3833db4 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/ext/saml2mdrpi/RegistrationInfo.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/ext/saml2mdrpi/RegistrationInfo.java
@@ -20,12 +20,15 @@ package org.opensaml.saml.ext.saml2mdrpi;
import java.time.Instant;
import java.util.List;
+import javax.annotation.Nonnull;
import javax.xml.XMLConstants;
import javax.xml.namespace.QName;
import org.opensaml.saml.common.SAMLObject;
import org.opensaml.saml.common.xml.SAMLConstants;
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
/**
* Representation of the <code><mdrpi:RegistrationInfo></code> element.
*
@@ -36,27 +39,27 @@ import org.opensaml.saml.common.xml.SAMLConstants;
public interface RegistrationInfo extends SAMLObject {
/** Name of the element inside the Extensions. */
- public static final String DEFAULT_ELEMENT_LOCAL_NAME = "RegistrationInfo";
+ @Nonnull @NotEmpty public static final String DEFAULT_ELEMENT_LOCAL_NAME = "RegistrationInfo";
/** Default element name. */
- public static final QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML20MDRPI_NS, DEFAULT_ELEMENT_LOCAL_NAME,
+ @Nonnull public static final QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML20MDRPI_NS, DEFAULT_ELEMENT_LOCAL_NAME,
SAMLConstants.SAML20MDRPI_PREFIX);
/** Local name of the XSI type. */
- public static final String TYPE_LOCAL_NAME = "RegistrationInfoType";
+ @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "RegistrationInfoType";
/** QName of the XSI type. */
- public static final QName TYPE_NAME =
+ @Nonnull public static final QName TYPE_NAME =
new QName(SAMLConstants.SAML20MDRPI_NS, TYPE_LOCAL_NAME, SAMLConstants.SAML20MDRPI_PREFIX);
/** registrationAuthority attribute name. */
- public static String REGISTRATION_AUTHORITY_ATTRIB_NAME = "registrationAuthority";
+ @Nonnull @NotEmpty public static String REGISTRATION_AUTHORITY_ATTRIB_NAME = "registrationAuthority";
/** registrationInstant attribute name. */
- public static String REGISTRATION_INSTANT_ATTRIB_NAME = "registrationInstant";
+ @Nonnull @NotEmpty public static String REGISTRATION_INSTANT_ATTRIB_NAME = "registrationInstant";
/** QName of the registrationInstant attribute. */
- public static final QName REGISTRATION_INSTANT_ATTRIB_QNAME =
+ @Nonnull public static final QName REGISTRATION_INSTANT_ATTRIB_QNAME =
new QName(null, REGISTRATION_INSTANT_ATTRIB_NAME, XMLConstants.DEFAULT_NS_PREFIX);
/**
@@ -94,4 +97,4 @@ public interface RegistrationInfo extends SAMLObject {
*/
public List<RegistrationPolicy> getRegistrationPolicies();
-}
+}
\ No newline at end of file
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AttributeConsumingService.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AttributeConsumingService.java
index d50001187..fced389a5 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AttributeConsumingService.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/AttributeConsumingService.java
@@ -19,36 +19,39 @@ package org.opensaml.saml.saml2.metadata;
import java.util.List;
+import javax.annotation.Nonnull;
import javax.xml.namespace.QName;
import org.opensaml.core.xml.schema.XSBooleanValue;
import org.opensaml.saml.common.SAMLObject;
import org.opensaml.saml.common.xml.SAMLConstants;
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
/**
* SAML 2.0 Metadata AttributeAuthorityDescriptor.
*/
public interface AttributeConsumingService extends SAMLObject {
/** Element name, no namespace. */
- public static final String DEFAULT_ELEMENT_LOCAL_NAME = "AttributeConsumingService";
+ @Nonnull @NotEmpty public static final String DEFAULT_ELEMENT_LOCAL_NAME = "AttributeConsumingService";
/** Default element name. */
- public static final QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML20MD_NS, DEFAULT_ELEMENT_LOCAL_NAME,
+ @Nonnull public static final QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML20MD_NS, DEFAULT_ELEMENT_LOCAL_NAME,
SAMLConstants.SAML20MD_PREFIX);
/** Local name of the XSI type. */
- public static final String TYPE_LOCAL_NAME = "AttributeConsumingServiceType";
+ @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "AttributeConsumingServiceType";
/** QName of the XSI type. */
- public static final QName TYPE_NAME = new QName(SAMLConstants.SAML20MD_NS, TYPE_LOCAL_NAME,
+ @Nonnull public static final QName TYPE_NAME = new QName(SAMLConstants.SAML20MD_NS, TYPE_LOCAL_NAME,
SAMLConstants.SAML20MD_PREFIX);
/** "index" attribute's local name. */
- public static final String INDEX_ATTRIB_NAME = "index";
+ @Nonnull @NotEmpty public static final String INDEX_ATTRIB_NAME = "index";
/** "isDefault" attribute's local name. */
- public static final String IS_DEFAULT_ATTRIB_NAME = "isDefault";
+ @Nonnull @NotEmpty public static final String IS_DEFAULT_ATTRIB_NAME = "isDefault";
/**
* Gets the index for this service.
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/RequestedAttribute.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/RequestedAttribute.java
index 9435fff73..be201b362 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/RequestedAttribute.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/metadata/RequestedAttribute.java
@@ -17,33 +17,36 @@
package org.opensaml.saml.saml2.metadata;
+import javax.annotation.Nonnull;
import javax.xml.namespace.QName;
import org.opensaml.core.xml.schema.XSBooleanValue;
import org.opensaml.saml.common.xml.SAMLConstants;
import org.opensaml.saml.saml2.core.Attribute;
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
/**
* SAML 2.0 Metadata RequestedAttribute.
*/
public interface RequestedAttribute extends Attribute {
/** Local name, no namespace. */
- public static final String DEFAULT_ELEMENT_LOCAL_NAME = "RequestedAttribute";
+ @Nonnull @NotEmpty public static final String DEFAULT_ELEMENT_LOCAL_NAME = "RequestedAttribute";
/** Default element name. */
- public static final QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML20MD_NS, DEFAULT_ELEMENT_LOCAL_NAME,
+ @Nonnull public static final QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML20MD_NS, DEFAULT_ELEMENT_LOCAL_NAME,
SAMLConstants.SAML20MD_PREFIX);
/** Local name of the XSI type. */
- public static final String TYPE_LOCAL_NAME = "RequestedAttributeType";
+ @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "RequestedAttributeType";
/** QName of the XSI type. */
- public static final QName TYPE_NAME = new QName(SAMLConstants.SAML20MD_NS, TYPE_LOCAL_NAME,
+ @Nonnull public static final QName TYPE_NAME = new QName(SAMLConstants.SAML20MD_NS, TYPE_LOCAL_NAME,
SAMLConstants.SAML20MD_PREFIX);
/** "isRequired" attribute's local name. */
- public static final String IS_REQUIRED_ATTRIB_NAME = "isRequired";
+ @Nonnull @NotEmpty public static final String IS_REQUIRED_ATTRIB_NAME = "isRequired";
/**
* Checks to see if this requested attribute is also required.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list