[java-shib-metadata] branch main updated: Fix warnings.

Scott Cantor cantor.2 at osu.edu
Tue Mar 14 23:45:36 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-metadata.

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

The following commit(s) were added to refs/heads/main by this push:
     new 7bfedc45 Fix warnings.
7bfedc45 is described below

commit 7bfedc45bfff8cc18f7f83f1366b090c173ea2d6
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Mar 14 19:45:33 2023 -0400

    Fix warnings.
---
 .../security/impl/MetadataPKIXValidationInformationResolver.java    | 1 +
 .../net/shibboleth/idp/saml/xmlobject/impl/ScopeMarshaller.java     | 6 ++++--
 .../net/shibboleth/idp/saml/xmlobject/impl/ScopedValueImpl.java     | 5 ++++-
 .../shibboleth/idp/saml/xmlobject/impl/ScopedValueMarshaller.java   | 6 ++++--
 .../shibboleth/idp/saml/xmlobject/impl/ScopedValueUnmarshaller.java | 6 ++++--
 5 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/security/impl/MetadataPKIXValidationInformationResolver.java b/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/security/impl/MetadataPKIXValidationInformationResolver.java
index 5e49b257..ba4c4533 100644
--- a/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/security/impl/MetadataPKIXValidationInformationResolver.java
+++ b/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/security/impl/MetadataPKIXValidationInformationResolver.java
@@ -290,6 +290,7 @@ public class MetadataPKIXValidationInformationResolver extends AbstractInitializ
         }
 
         for (final XMLObject xmlObj : authorities) {
+            assert xmlObj != null;
             extractPKIXInfo(accumulator, (KeyAuthority) xmlObj);
         }
     }
diff --git a/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopeMarshaller.java b/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopeMarshaller.java
index 2c9d085c..5c0fcace 100644
--- a/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopeMarshaller.java
+++ b/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopeMarshaller.java
@@ -17,6 +17,7 @@
 
 package net.shibboleth.idp.saml.xmlobject.impl;
 
+import javax.annotation.Nonnull;
 import javax.annotation.concurrent.ThreadSafe;
 
 import net.shibboleth.idp.saml.xmlobject.Scope;
@@ -32,7 +33,8 @@ import org.w3c.dom.Element;
 public class ScopeMarshaller extends AbstractXMLObjectMarshaller {
 
     /** {@inheritDoc} */
-    protected void marshallAttributes(final XMLObject xmlObject, final Element domElement) throws MarshallingException {
+    protected void marshallAttributes(@Nonnull final XMLObject xmlObject, @Nonnull final Element domElement)
+            throws MarshallingException {
         final Scope scope = (Scope) xmlObject;
 
         if (scope.getRegexpXSBoolean() != null) {
@@ -42,7 +44,7 @@ public class ScopeMarshaller extends AbstractXMLObjectMarshaller {
     }
 
     /** {@inheritDoc} */
-    protected void marshallElementContent(final XMLObject xmlObject, final Element domElement)
+    protected void marshallElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final Element domElement)
             throws MarshallingException {
         final Scope shibMDScope = (Scope) xmlObject;
 
diff --git a/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopedValueImpl.java b/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopedValueImpl.java
index 486526d0..38f93c04 100644
--- a/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopedValueImpl.java
+++ b/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopedValueImpl.java
@@ -17,6 +17,8 @@
 
 package net.shibboleth.idp.saml.xmlobject.impl;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.annotation.concurrent.NotThreadSafe;
 import javax.xml.namespace.QName;
 
@@ -41,7 +43,8 @@ public class ScopedValueImpl extends XSAnyImpl implements ScopedValue {
      * @param elementLocalName the local name of the XML element this Object represents
      * @param namespacePrefix the prefix for the given namespace
      */
-    protected ScopedValueImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) {
+    protected ScopedValueImpl(@Nullable final String namespaceURI, @Nonnull final String elementLocalName,
+            @Nullable final String namespacePrefix) {
         super(namespaceURI, elementLocalName, namespacePrefix);
     }
 
diff --git a/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopedValueMarshaller.java b/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopedValueMarshaller.java
index 9a544b79..7bb6e38d 100644
--- a/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopedValueMarshaller.java
+++ b/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopedValueMarshaller.java
@@ -17,6 +17,7 @@
 
 package net.shibboleth.idp.saml.xmlobject.impl;
 
+import javax.annotation.Nonnull;
 import javax.annotation.concurrent.ThreadSafe;
 
 import net.shibboleth.idp.saml.xmlobject.ScopedValue;
@@ -32,7 +33,8 @@ import org.w3c.dom.Element;
 public class ScopedValueMarshaller extends AbstractXMLObjectMarshaller {
 
     /** {@inheritDoc} */
-    protected void marshallAttributes(final XMLObject xmlObject, final Element domElement) throws MarshallingException {
+    protected void marshallAttributes(@Nonnull final XMLObject xmlObject, @Nonnull final Element domElement)
+            throws MarshallingException {
         final ScopedValue scopedValue = (ScopedValue) xmlObject;
 
         if (null != scopedValue.getScopeAttributeName()) {
@@ -42,7 +44,7 @@ public class ScopedValueMarshaller extends AbstractXMLObjectMarshaller {
     }
 
     /** {@inheritDoc} */
-    protected void marshallElementContent(final XMLObject xmlObject, final Element domElement)
+    protected void marshallElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final Element domElement)
             throws MarshallingException {
         final ScopedValue scopedValue = (ScopedValue) xmlObject;
 
diff --git a/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopedValueUnmarshaller.java b/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopedValueUnmarshaller.java
index c16156f7..13f8444a 100644
--- a/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopedValueUnmarshaller.java
+++ b/shib-metadata-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/ScopedValueUnmarshaller.java
@@ -17,6 +17,7 @@
 
 package net.shibboleth.idp.saml.xmlobject.impl;
 
+import javax.annotation.Nonnull;
 import javax.annotation.concurrent.ThreadSafe;
 
 import net.shibboleth.idp.saml.xmlobject.ScopedValue;
@@ -33,7 +34,8 @@ import com.google.common.base.Strings;
 public class ScopedValueUnmarshaller extends AbstractXMLObjectUnmarshaller {
 
     /** {@inheritDoc} */
-    protected void processAttribute(final XMLObject xmlObject, final Attr attribute) throws UnmarshallingException {
+    protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
+            throws UnmarshallingException {
         final ScopedValue sv = (ScopedValue) xmlObject;
 
         if (Strings.isNullOrEmpty(sv.getScopeAttributeName())) {
@@ -44,7 +46,7 @@ public class ScopedValueUnmarshaller extends AbstractXMLObjectUnmarshaller {
     }
 
     /** {@inheritDoc} */
-    protected void processElementContent(final XMLObject xmlObject, final String elementContent) {
+    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
         final ScopedValue sv = (ScopedValue) xmlObject;
 
         sv.setValue(elementContent);

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


More information about the commits mailing list