[java-metadata-aggregator] branch main updated: Nullability
Ian Young
ian at iay.org.uk
Thu Feb 2 20:16:42 UTC 2023
This is an automated email from the git hooks/post-receive script.
iay pushed a commit to branch main
in repository java-metadata-aggregator.
View the commit online:
http://git.shibboleth.net/view/?p=java-metadata-aggregator.git;a=commit;h=386ae50e04078e16b1b47bc9c7f25343cb73a375
The following commit(s) were added to refs/heads/main by this push:
new 386ae50 Nullability
386ae50 is described below
commit 386ae50e04078e16b1b47bc9c7f25343cb73a375
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Thu Feb 2 20:16:39 2023 +0000
Nullability
---
.../metadata/dom/AbstractAttributeValidationStage.java | 4 ++--
.../shibboleth/metadata/dom/AbstractElementVisitingStage.java | 3 ++-
.../metadata/dom/AbstractElementVisitingValidationStage.java | 3 ++-
.../net/shibboleth/metadata/dom/AbstractXSLProcessingStage.java | 7 ++++---
.../java/net/shibboleth/metadata/dom/ElementsStrippingStage.java | 3 ++-
.../net/shibboleth/metadata/dom/NamespacesStrippingStage.java | 3 ++-
.../net/shibboleth/metadata/dom/XMLSchemaValidationStage.java | 3 ++-
.../net/shibboleth/metadata/dom/XMLSignatureSigningStage.java | 9 +++++----
.../net/shibboleth/metadata/dom/XMLSignatureValidationStage.java | 5 +++--
.../java/net/shibboleth/metadata/dom/saml/EntityFilterStage.java | 3 ++-
.../net/shibboleth/metadata/dom/saml/EntityRoleFilterStage.java | 3 ++-
.../metadata/dom/saml/mdattr/EntityAttributeFilteringStage.java | 3 ++-
.../dom/saml/mdrpi/EntityRegistrationAuthorityFilterStage.java | 3 ++-
.../mdrpi/RegistrationAuthorityItemIdentificationStrategy.java | 5 +++--
.../metadata/pipeline/AbstractItemMetadataSelectionStage.java | 3 ++-
.../net/shibboleth/metadata/pipeline/ItemIdTransformStage.java | 3 ++-
.../shibboleth/metadata/pipeline/ItemMetadataAddingStage.java | 3 ++-
.../shibboleth/metadata/pipeline/PipelineDemultiplexerStage.java | 3 ++-
.../net/shibboleth/metadata/pipeline/PipelineMergeStage.java | 3 ++-
.../net/shibboleth/metadata/pipeline/StaticItemSourceStage.java | 3 ++-
.../java/net/shibboleth/metadata/validate/ValidatorSequence.java | 3 ++-
.../metadata/dom/saml/DiscoFeedCollectionSerializerTest.java | 3 ++-
22 files changed, 51 insertions(+), 30 deletions(-)
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractAttributeValidationStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractAttributeValidationStage.java
index e7b8a7b..ff46985 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractAttributeValidationStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractAttributeValidationStage.java
@@ -31,6 +31,7 @@ import org.w3c.dom.Element;
import net.shibboleth.metadata.pipeline.StageProcessingException;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.logic.Constraint;
@@ -57,9 +58,8 @@ public abstract class AbstractAttributeValidationStage<T> extends AbstractElemen
* (which will by far dominate use cases) are given the preferred
* identifiers.</p>
*/
- @SuppressWarnings("null")
@NonnullElements @Unmodifiable @GuardedBy("this")
- private @Nonnull Set<QName> attributeNames = Set.of();
+ private @Nonnull Set<QName> attributeNames = CollectionSupport.emptySet();
/**
* Gets the collection of attribute names to visit.
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractElementVisitingStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractElementVisitingStage.java
index 3d31d97..91aafea 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractElementVisitingStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractElementVisitingStage.java
@@ -30,6 +30,7 @@ import org.w3c.dom.Element;
import net.shibboleth.metadata.Item;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.logic.Constraint;
/**
@@ -43,7 +44,7 @@ public abstract class AbstractElementVisitingStage extends AbstractDOMTraversalS
/** Collection of element names for those elements we will be visiting. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private Set<QName> elementNames = Set.of();
+ private Set<QName> elementNames = CollectionSupport.emptySet();
/**
* Gets the collection of element names to visit.
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractElementVisitingValidationStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractElementVisitingValidationStage.java
index 8dfb14a..bad7a5e 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractElementVisitingValidationStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractElementVisitingValidationStage.java
@@ -30,6 +30,7 @@ import org.w3c.dom.Node;
import net.shibboleth.metadata.Item;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.logic.Constraint;
@@ -54,7 +55,7 @@ public abstract class AbstractElementVisitingValidationStage<V, N>
/** Collection of element names for those elements we will be visiting. */
@NonnullElements @Unmodifiable @GuardedBy("this")
- private @Nonnull Set<QName> elementNames = Set.of();
+ private @Nonnull Set<QName> elementNames = CollectionSupport.emptySet();
/**
* Gets the collection of element names to visit.
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractXSLProcessingStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractXSLProcessingStage.java
index 4b0b328..cd64f42 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractXSLProcessingStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/AbstractXSLProcessingStage.java
@@ -51,6 +51,7 @@ import net.shibboleth.metadata.pipeline.StageProcessingException;
import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.logic.Constraint;
import net.shibboleth.shared.primitive.StringSupport;
@@ -89,11 +90,11 @@ public abstract class AbstractXSLProcessingStage extends AbstractStage<Element>
/** Attributes set on the {@link Transformer} used by this stage. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private Map<String, Object> transformAttributes = Map.of();
+ private Map<String, Object> transformAttributes = CollectionSupport.emptyMap();
/** Features set on the {@link Transformer} used by this stage. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private Map<String, Boolean> transformFeatures = Map.of();
+ private Map<String, Boolean> transformFeatures = CollectionSupport.emptyMap();
/**
* Collection of named parameters to make available to the transform.
@@ -101,7 +102,7 @@ public abstract class AbstractXSLProcessingStage extends AbstractStage<Element>
* If not set, an empty collection.
*/
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private Map<String, Object> transformParameters = Map.of();
+ private Map<String, Object> transformParameters = CollectionSupport.emptyMap();
/** {@link URIResolver} to use in the transformer. Default value: <code>null</code>. */
@Nullable @GuardedBy("this")
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/ElementsStrippingStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/ElementsStrippingStage.java
index 881b134..ed76dbf 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/dom/ElementsStrippingStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/ElementsStrippingStage.java
@@ -34,6 +34,7 @@ import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.NotEmpty;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.logic.Constraint;
import net.shibboleth.shared.primitive.StringSupport;
@@ -143,7 +144,7 @@ public class ElementsStrippingStage extends AbstractDOMTraversalStage<ElementsSt
/** Names of the elements to strip. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private Set<String> elementNames = Set.of();
+ private Set<String> elementNames = CollectionSupport.emptySet();
/** Whether we are operating in a whitelisting mode (<code>false</code> by default). */
private boolean whitelisting;
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/NamespacesStrippingStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/NamespacesStrippingStage.java
index 33c2425..6908a15 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/dom/NamespacesStrippingStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/NamespacesStrippingStage.java
@@ -27,6 +27,7 @@ import javax.annotation.concurrent.ThreadSafe;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
/**
* A stage which removes all evidence of a given collection of XML namespaces from each metadata item.
@@ -51,7 +52,7 @@ public class NamespacesStrippingStage extends AbstractNamespacesStrippingStage {
* XML namespaces to whitelist or blacklist.
*/
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private Set<String> namespaces = Set.of();
+ private Set<String> namespaces = CollectionSupport.emptySet();
/**
* Whether we are whitelisting or blacklisting (default: blacklisting).
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/XMLSchemaValidationStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/XMLSchemaValidationStage.java
index 3df456e..567efaa 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/dom/XMLSchemaValidationStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/XMLSchemaValidationStage.java
@@ -43,6 +43,7 @@ import net.shibboleth.metadata.pipeline.StageProcessingException;
import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.xml.SchemaBuilder;
import net.shibboleth.shared.xml.SerializeSupport;
@@ -68,7 +69,7 @@ public class XMLSchemaValidationStage extends AbstractIteratingStage<Element> {
/** Collection of schema resources. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private List<Resource> schemaResources = List.of();
+ private List<Resource> schemaResources = CollectionSupport.emptyList();
/** Whether Elements are required to be schema valid. Default value: <code>true</code> */
@GuardedBy("this")
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/XMLSignatureSigningStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/XMLSignatureSigningStage.java
index c9bcb7d..3474817 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/dom/XMLSignatureSigningStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/XMLSignatureSigningStage.java
@@ -41,6 +41,7 @@ import net.shibboleth.metadata.pipeline.StageProcessingException;
import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.logic.Constraint;
@@ -89,11 +90,11 @@ public class XMLSignatureSigningStage extends AbstractStage<Element> {
* empty list
*/
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private List<X509Certificate> certificates = List.of();
+ private List<X509Certificate> certificates = CollectionSupport.emptyList();
/** CRLs to be included with the signature. Default value: empty list */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private List<X509CRL> crls = List.of();
+ private List<X509CRL> crls = CollectionSupport.emptyList();
/** Whether to use exclusive canonicalization. Default value: <code>true</code> */
@GuardedBy("this") private boolean c14nExclusive = true;
@@ -106,7 +107,7 @@ public class XMLSignatureSigningStage extends AbstractStage<Element> {
/** Inclusive prefix list used with exclusive canonicalization. Default value: empty list */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private List<String> inclusivePrefixList = List.of();
+ private List<String> inclusivePrefixList = CollectionSupport.emptyList();
/**
* Names of attributes to treat as ID attributes for signature referencing. Default value: list containing the
@@ -117,7 +118,7 @@ public class XMLSignatureSigningStage extends AbstractStage<Element> {
/** Explicit names to associate with the given signing key. Default value: empty list */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private List<String> keyNames = List.of();
+ private List<String> keyNames = CollectionSupport.emptyList();
/** Whether key names should be included in the signature's KeyInfo. Default value: <code>true</code> */
@GuardedBy("this") private boolean includeKeyNames = true;
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/XMLSignatureValidationStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/XMLSignatureValidationStage.java
index 635c367..6e682ff 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/dom/XMLSignatureValidationStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/XMLSignatureValidationStage.java
@@ -42,6 +42,7 @@ import net.shibboleth.metadata.pipeline.AbstractStage;
import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.logic.Constraint;
import net.shibboleth.shared.xml.SerializeSupport;
@@ -86,11 +87,11 @@ public class XMLSignatureValidationStage extends AbstractStage<Element> {
/** Set of blacklisted digest URIs. Default value: empty set. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private Set<String> blacklistedDigests = Set.of();
+ private Set<String> blacklistedDigests = CollectionSupport.emptySet();
/** Set of blacklisted signature method URIs. Default value: empty set. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private Set<String> blacklistedSignatureMethods = Set.of();
+ private Set<String> blacklistedSignatureMethods = CollectionSupport.emptySet();
/** Option to determine whether empty references are to be permitted. Default value: <code>true</code>. */
@GuardedBy("this")
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/EntityFilterStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/EntityFilterStage.java
index 48190d6..98c50e3 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/EntityFilterStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/EntityFilterStage.java
@@ -34,6 +34,7 @@ import net.shibboleth.metadata.Item;
import net.shibboleth.metadata.pipeline.AbstractFilteringStage;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.xml.ElementSupport;
/** A pipeline stage that will remove SAML EntityDescriptior elements which do meet specified filtering criteria. */
@@ -45,7 +46,7 @@ public class EntityFilterStage extends AbstractFilteringStage<Element> {
/** Entities which are white/black listed depending on the value of {@link #whitelistingEntities}. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private Set<String> designatedEntities = Set.of();
+ private Set<String> designatedEntities = CollectionSupport.emptySet();
/** Whether {@link #designatedEntities} should be considered a whitelist or a blacklist. Default value: false */
@GuardedBy("this") private boolean whitelistingEntities;
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/EntityRoleFilterStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/EntityRoleFilterStage.java
index 274cdaf..caf301b 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/EntityRoleFilterStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/EntityRoleFilterStage.java
@@ -36,6 +36,7 @@ import net.shibboleth.metadata.Item;
import net.shibboleth.metadata.pipeline.AbstractFilteringStage;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.xml.DOMTypeSupport;
import net.shibboleth.shared.xml.ElementSupport;
import net.shibboleth.shared.xml.QNameSupport;
@@ -66,7 +67,7 @@ public class EntityRoleFilterStage extends AbstractFilteringStage<Element> {
/** Role element or type names which are white/black listed depending on the value of {@link #whitelistingRoles}. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private Set<QName> designatedRoles = Set.of();
+ private Set<QName> designatedRoles = CollectionSupport.emptySet();
/** Whether {@link #designatedRoles} should be considered a whitelist or a blacklist. Default value: false */
@GuardedBy("this") private boolean whitelistingRoles;
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/mdattr/EntityAttributeFilteringStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/mdattr/EntityAttributeFilteringStage.java
index 9e799aa..f220323 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/mdattr/EntityAttributeFilteringStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/mdattr/EntityAttributeFilteringStage.java
@@ -39,6 +39,7 @@ import net.shibboleth.metadata.dom.saml.mdrpi.RegistrationAuthority;
import net.shibboleth.metadata.pipeline.AbstractIteratingStage;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.logic.Constraint;
import net.shibboleth.shared.xml.ElementSupport;
@@ -204,7 +205,7 @@ public class EntityAttributeFilteringStage extends AbstractIteratingStage<Elemen
* termination.
*/
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private List<Predicate<EntityAttributeContext>> rules = List.of();
+ private List<Predicate<EntityAttributeContext>> rules = CollectionSupport.emptyList();
/** Mode of operation: whitelisting or blacklisting. Default: whitelisting. */
@GuardedBy("this") private boolean whitelisting = true;
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStage.java
index 91ade1f..bef92a5 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStage.java
@@ -35,6 +35,7 @@ import net.shibboleth.metadata.dom.saml.SAMLMetadataSupport;
import net.shibboleth.metadata.pipeline.AbstractFilteringStage;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.xml.AttributeSupport;
import net.shibboleth.shared.xml.ElementSupport;
@@ -50,7 +51,7 @@ public class EntityRegistrationAuthorityFilterStage extends AbstractFilteringSta
/** Registrars which are white/black listed depending on the value of {@link #whitelistingAuthorities}. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private Set<String> designatedAuthorities = Set.of();
+ private Set<String> designatedAuthorities = CollectionSupport.emptySet();
/** Whether {@link #designatedAuthorities} should be considered a whitelist or a blacklist. Default value: false */
@GuardedBy("this") private boolean whitelistingAuthorities;
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/mdrpi/RegistrationAuthorityItemIdentificationStrategy.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/mdrpi/RegistrationAuthorityItemIdentificationStrategy.java
index e447242..0619c3f 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/mdrpi/RegistrationAuthorityItemIdentificationStrategy.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/saml/mdrpi/RegistrationAuthorityItemIdentificationStrategy.java
@@ -31,6 +31,7 @@ import net.shibboleth.metadata.FirstItemIdItemIdentificationStrategy;
import net.shibboleth.metadata.Item;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
/**
* Item identification strategy for interfederation use cases.
@@ -53,13 +54,13 @@ public class RegistrationAuthorityItemIdentificationStrategy<T> extends FirstIte
* Set of registration authorities to be ignored.
*/
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private Set<String> ignoredRegistrationAuthorities = Set.of();
+ private Set<String> ignoredRegistrationAuthorities = CollectionSupport.emptySet();
/**
* Replacement display names for registration authorities.
*/
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private Map<String, String> registrationAuthorityDisplayNames = Map.of();
+ private Map<String, String> registrationAuthorityDisplayNames = CollectionSupport.emptyMap();
/**
* Returns the set of registration authorities we are ignoring.
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/AbstractItemMetadataSelectionStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/AbstractItemMetadataSelectionStage.java
index ea80d78..4fffa62 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/AbstractItemMetadataSelectionStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/AbstractItemMetadataSelectionStage.java
@@ -33,6 +33,7 @@ import net.shibboleth.metadata.ItemMetadata;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
import net.shibboleth.shared.collection.ClassToInstanceMultiMap;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.logic.Constraint;
/**
@@ -49,7 +50,7 @@ public abstract class AbstractItemMetadataSelectionStage<T, B> extends AbstractS
* {@link ItemMetadata} classes that, if an item contains them, will cause the {@link Item} to be selected.
*/
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private Set<Class<? extends B>> selectionRequirements = Set.of();
+ private Set<Class<? extends B>> selectionRequirements = CollectionSupport.emptySet();
/** Strategy used to generate item identifiers for logging purposes. */
@Nonnull @GuardedBy("this")
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/ItemIdTransformStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/ItemIdTransformStage.java
index a3011fc..035593c 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/ItemIdTransformStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/ItemIdTransformStage.java
@@ -30,6 +30,7 @@ import net.shibboleth.metadata.Item;
import net.shibboleth.metadata.ItemId;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
/**
* A pipeline stage that, taking each {@link ItemId} associated with an {@link Item}, transforms its
@@ -45,7 +46,7 @@ public class ItemIdTransformStage<T> extends AbstractIteratingStage<T> {
/** Transformers used on IDs. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private List<Function<String, String>> idTransformers = List.of();
+ private List<Function<String, String>> idTransformers = CollectionSupport.emptyList();
/**
* Gets the transforms used to produce the transformed entity IDs.
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/ItemMetadataAddingStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/ItemMetadataAddingStage.java
index b296da7..3c2c4f7 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/ItemMetadataAddingStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/ItemMetadataAddingStage.java
@@ -28,6 +28,7 @@ import net.shibboleth.metadata.Item;
import net.shibboleth.metadata.ItemMetadata;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.logic.Constraint;
/**
@@ -42,7 +43,7 @@ public class ItemMetadataAddingStage<T> extends AbstractIteratingStage<T> {
/** {@link ItemMetadata} objects to add to each {@link Item}'s item metadata. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private List<ItemMetadata> additionalItemMetadata = List.of();
+ private List<ItemMetadata> additionalItemMetadata = CollectionSupport.emptyList();
/**
* Gets the {@link ItemMetadata} being added to each {@link Item}'s item metadata.
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/PipelineDemultiplexerStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/PipelineDemultiplexerStage.java
index cf8ee79..4685eee 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/PipelineDemultiplexerStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/PipelineDemultiplexerStage.java
@@ -37,6 +37,7 @@ import net.shibboleth.metadata.pipeline.impl.FutureSupport;
import net.shibboleth.metadata.pipeline.impl.PipelineCallable;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.collection.Pair;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.logic.Constraint;
@@ -96,7 +97,7 @@ public class PipelineDemultiplexerStage<T> extends AbstractStage<T> {
/** The pipelines through which items are sent and the selection strategy used for that pipeline. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private List<Pair<Pipeline<T>, Predicate<Item<T>>>> pipelineAndStrategies = List.of();
+ private List<Pair<Pipeline<T>, Predicate<Item<T>>>> pipelineAndStrategies = CollectionSupport.emptyList();
/**
* Gets the executor used to run the selected and non-selected item pipelines.
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/PipelineMergeStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/PipelineMergeStage.java
index 1d77f8f..d1830cd 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/PipelineMergeStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/PipelineMergeStage.java
@@ -38,6 +38,7 @@ import net.shibboleth.metadata.pipeline.impl.FutureSupport;
import net.shibboleth.metadata.pipeline.impl.PipelineCallable;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.logic.Constraint;
import net.shibboleth.shared.primitive.DeprecationSupport;
@@ -87,7 +88,7 @@ public class PipelineMergeStage<T> extends AbstractStage<T> {
/** Pipelines whose results become the output of this source. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private List<Pipeline<T>> mergedPipelines = List.of();
+ private List<Pipeline<T>> mergedPipelines = CollectionSupport.emptyList();
/**
* Gets the executor used to run the selected and non-selected item pipelines.
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/StaticItemSourceStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/StaticItemSourceStage.java
index 5faec57..76c18e9 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/StaticItemSourceStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/StaticItemSourceStage.java
@@ -26,6 +26,7 @@ import javax.annotation.concurrent.ThreadSafe;
import net.shibboleth.metadata.Item;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
/**
* A stage which adds a static collection of Items to a {@link Item} collection.
@@ -37,7 +38,7 @@ public class StaticItemSourceStage<T> extends AbstractStage<T> {
/** Collection of static Items added to each Item collection by {@link #execute(List)}. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private List<Item<T>> source = List.of();
+ private List<Item<T>> source = CollectionSupport.emptyList();
/**
* Gets the collection of static Items added to the Item collection by this stage.
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/validate/ValidatorSequence.java b/mda-framework/src/main/java/net/shibboleth/metadata/validate/ValidatorSequence.java
index 2b4f67a..f3af034 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/validate/ValidatorSequence.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/validate/ValidatorSequence.java
@@ -27,6 +27,7 @@ import net.shibboleth.metadata.Item;
import net.shibboleth.metadata.pipeline.StageProcessingException;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
/**
@@ -46,7 +47,7 @@ public class ValidatorSequence<V> extends BaseValidator implements Validator<V>
/** The list of validators to apply. */
@Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
- private List<Validator<V>> validators = List.of();
+ private List<Validator<V>> validators = CollectionSupport.emptyList();
/**
* Set the list of validators to apply to each item.
diff --git a/mda-framework/src/test/java/net/shibboleth/metadata/dom/saml/DiscoFeedCollectionSerializerTest.java b/mda-framework/src/test/java/net/shibboleth/metadata/dom/saml/DiscoFeedCollectionSerializerTest.java
index 9e947e8..e7e0380 100644
--- a/mda-framework/src/test/java/net/shibboleth/metadata/dom/saml/DiscoFeedCollectionSerializerTest.java
+++ b/mda-framework/src/test/java/net/shibboleth/metadata/dom/saml/DiscoFeedCollectionSerializerTest.java
@@ -19,6 +19,7 @@ import org.w3c.dom.Element;
import net.shibboleth.metadata.Item;
import net.shibboleth.metadata.ItemCollectionSerializer;
import net.shibboleth.metadata.dom.BaseDOMTest;
+import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.xml.XMLParserException;
public class DiscoFeedCollectionSerializerTest extends BaseDOMTest {
@@ -33,7 +34,7 @@ public class DiscoFeedCollectionSerializerTest extends BaseDOMTest {
ser.initialize();
final String output;
try (final var out = new ByteArrayOutputStream()) {
- ser.serializeCollection(List.of(), out);
+ ser.serializeCollection(CollectionSupport.emptyList(), out);
output = out.toString();
}
final var read = Json.createReader(new StringReader(output));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list