[java-shib-shared] branch main updated: Adjust naming of some new methods.

Scott Cantor cantor.2 at osu.edu
Tue Mar 7 16:21:42 UTC 2023


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

scantor pushed a commit to branch main
in repository java-shib-shared.

View the commit online:
http://git.shibboleth.net/view/?p=java-shib-shared.git;a=commit;h=bc42c81fd34613451649eef5b816da140d778cbb

The following commit(s) were added to refs/heads/main by this push:
     new bc42c81f Adjust naming of some new methods.
bc42c81f is described below

commit bc42c81fd34613451649eef5b816da140d778cbb
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Mar 7 11:21:39 2023 -0500

    Adjust naming of some new methods.
---
 .../src/main/java/net/shibboleth/shared/xml/AttributeSupport.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/shib-support/src/main/java/net/shibboleth/shared/xml/AttributeSupport.java b/shib-support/src/main/java/net/shibboleth/shared/xml/AttributeSupport.java
index 3d145aba..bac6fcc3 100644
--- a/shib-support/src/main/java/net/shibboleth/shared/xml/AttributeSupport.java
+++ b/shib-support/src/main/java/net/shibboleth/shared/xml/AttributeSupport.java
@@ -149,6 +149,7 @@ public final class AttributeSupport {
         Constraint.isNotNull(attributeValue, "Attribute value may not be null");
 
         final Document document = element.getOwnerDocument();
+        assert document != null;
         final Attr attribute = constructAttribute(document, attributeName);
         attribute.setValue(attributeValue);
         element.setAttributeNodeNS(attribute);
@@ -300,7 +301,7 @@ public final class AttributeSupport {
      * 
      * @since 9.0.0
      */
-    @Nonnull @NotEmpty public static String getRequiredAttributeValue(@Nullable final Element element,
+    @Nonnull @NotEmpty public static String ensureAttributeValue(@Nullable final Element element,
             @Nullable final String namespace, @Nonnull @NotEmpty final String attributeLocalName) {
         return Constraint.isNotNull(StringSupport.trimOrNull(
                 getAttributeValue(element, namespace, attributeLocalName)),
@@ -318,7 +319,7 @@ public final class AttributeSupport {
      * 
      * @since 9.0.0
      */
-    @Nonnull @NotEmpty public static String getRequiredAttributeValue(@Nullable final Element element,
+    @Nonnull @NotEmpty public static String ensureAttributeValue(@Nullable final Element element,
             @Nonnull final QName attributeName) {
         return Constraint.isNotNull(StringSupport.trimOrNull(getAttributeValue(element, attributeName)),
                 attributeName.getLocalPart() + " cannot be null or empty");

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


More information about the commits mailing list