[java-opensaml] branch main updated: Guard for nulls in child collection.
Scott Cantor
cantor.2 at osu.edu
Mon Apr 3 23:41:54 UTC 2023
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=3c541c025ad08df7e02759037f81ce5c1b2e12cd
The following commit(s) were added to refs/heads/main by this push:
new 3c541c025 Guard for nulls in child collection.
3c541c025 is described below
commit 3c541c025ad08df7e02759037f81ce5c1b2e12cd
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Apr 3 19:41:51 2023 -0400
Guard for nulls in child collection.
---
.../saml/saml2/core/impl/AssertionImpl.java | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AssertionImpl.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AssertionImpl.java
index 2df79bf68..aaef8e5d6 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AssertionImpl.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/AssertionImpl.java
@@ -198,15 +198,26 @@ public class AssertionImpl extends AbstractSignableSAMLObject implements Asserti
public List<XMLObject> getOrderedChildren() {
final ArrayList<XMLObject> children = new ArrayList<>();
- children.add(issuer);
+ if (issuer != null) {
+ children.add(issuer);
+ }
- if(getSignature() != null){
+ if (getSignature() != null){
children.add(getSignature());
}
- children.add(subject);
- children.add(conditions);
- children.add(advice);
+ if (subject != null) {
+ children.add(subject);
+ }
+
+ if (conditions != null) {
+ children.add(conditions);
+ }
+
+ if (advice != null) {
+ children.add(advice);
+ }
+
children.addAll(statements);
return Collections.unmodifiableList(children);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list