[java-shib-attribute] branch main updated: Fix another test bug.

Scott Cantor cantor.2 at osu.edu
Tue May 2 14:34:02 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-attribute.

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

The following commit(s) were added to refs/heads/main by this push:
     new a3811ce0f Fix another test bug.
a3811ce0f is described below

commit a3811ce0f156c652fdf105afbae8cc005ed759a3
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue May 2 10:34:00 2023 -0400

    Fix another test bug.
---
 .../transcoding/impl/SAML1ScopedStringAttributeTranscoderTest.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/shib-saml-attribute-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1ScopedStringAttributeTranscoderTest.java b/shib-saml-attribute-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1ScopedStringAttributeTranscoderTest.java
index 76d3b65ec..79dfe8486 100644
--- a/shib-saml-attribute-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1ScopedStringAttributeTranscoderTest.java
+++ b/shib-saml-attribute-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1ScopedStringAttributeTranscoderTest.java
@@ -325,12 +325,14 @@ public class SAML1ScopedStringAttributeTranscoderTest extends OpenSAMLInitBaseTe
         //
         // order of results is not guaranteed so sense the result from the length
         //
-        if (child1.getValue().length() == STRING_1.length()) {
+        final String val1 = child1.getValue();
+        assert val1 != null;
+        if (val1.length() == STRING_1.length()) {
             Assert.assertEquals(child1.getValue(), STRING_1, "Input matches output");
             Assert.assertEquals(child2.getValue(), STRING_2, "Input matches output");
             Assert.assertEquals(child1.getScope(), SCOPE_1, "Input matches output");
             Assert.assertEquals(child2.getScope(), SCOPE_2, "Input matches output");
-        } else if (child1.getValue().length() == STRING_2.length()) {
+        } else if (val1.length() == STRING_2.length()) {
             Assert.assertEquals(child2.getValue(), STRING_1, "Input matches output");
             Assert.assertEquals(child1.getValue(), STRING_2, "Input matches output");
             Assert.assertEquals(child2.getScope(), SCOPE_1, "Input matches output");

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


More information about the commits mailing list