[java-opensaml] branch main updated: Clean stray annotations.
Scott Cantor
cantor.2 at osu.edu
Tue Jun 20 23:50:24 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=5168c117b110692ee1df25586329f2efbd264a88
The following commit(s) were added to refs/heads/main by this push:
new 5168c117b Clean stray annotations.
5168c117b is described below
commit 5168c117b110692ee1df25586329f2efbd264a88
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jun 20 19:50:21 2023 -0400
Clean stray annotations.
---
.../opensaml/core/metrics/impl/FilteredMetricRegistry.java | 5 ++---
.../messaging/impl/BaseClientCertAuthSecurityHandler.java | 5 +++--
.../java/org/opensaml/spring/trust/StaticPKIXFactoryBean.java | 11 ++++++-----
.../storage/impl/client/ClientStorageServiceStore.java | 3 +--
.../storage/impl/client/PopulateClientStorageSaveContext.java | 3 +--
.../saml/saml2/testing/SAML2ActionTestingSupport.java | 4 +---
6 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/opensaml-core-impl/src/main/java/org/opensaml/core/metrics/impl/FilteredMetricRegistry.java b/opensaml-core-impl/src/main/java/org/opensaml/core/metrics/impl/FilteredMetricRegistry.java
index f5c4c40e8..9f1e69f06 100644
--- a/opensaml-core-impl/src/main/java/org/opensaml/core/metrics/impl/FilteredMetricRegistry.java
+++ b/opensaml-core-impl/src/main/java/org/opensaml/core/metrics/impl/FilteredMetricRegistry.java
@@ -30,7 +30,6 @@ import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.MetricSet;
import com.codahale.metrics.Timer;
-import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.logic.Constraint;
/**
@@ -116,9 +115,9 @@ public class FilteredMetricRegistry extends MetricRegistry {
*
* @throws IllegalArgumentException if any of the names are already registered
*/
- public void registerMultiple(@Nonnull @NonnullElements final Collection<MetricSet> metricSets)
+ public void registerMultiple(@Nonnull final Collection<MetricSet> metricSets)
throws IllegalArgumentException {
- Constraint.isNotNull(metricSets, "Collection cannot be null").forEach(m -> registerAll(m));
+ Constraint.isNotNull(metricSets, "Collection cannot be null").forEach(this::registerAll);
}
}
\ No newline at end of file
diff --git a/opensaml-security-impl/src/main/java/org/opensaml/security/messaging/impl/BaseClientCertAuthSecurityHandler.java b/opensaml-security-impl/src/main/java/org/opensaml/security/messaging/impl/BaseClientCertAuthSecurityHandler.java
index ed74acaa3..b5457caa5 100644
--- a/opensaml-security-impl/src/main/java/org/opensaml/security/messaging/impl/BaseClientCertAuthSecurityHandler.java
+++ b/opensaml-security-impl/src/main/java/org/opensaml/security/messaging/impl/BaseClientCertAuthSecurityHandler.java
@@ -44,7 +44,8 @@ import com.google.common.base.Strings;
import jakarta.servlet.http.HttpServletRequest;
import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
-import net.shibboleth.shared.annotation.constraint.NonnullElements;
+import net.shibboleth.shared.annotation.constraint.NotLive;
+import net.shibboleth.shared.annotation.constraint.Unmodifiable;
import net.shibboleth.shared.codec.Base64Support;
import net.shibboleth.shared.codec.EncodingException;
import net.shibboleth.shared.component.ComponentInitializationException;
@@ -544,7 +545,7 @@ public abstract class BaseClientCertAuthSecurityHandler extends BaseTrustEngineS
*
* @return the list of certificate subject alt names
*/
- @Nonnull @NonnullElements protected List<String> getAltNames(@Nonnull final X509Certificate cert,
+ @Nonnull @Unmodifiable @NotLive protected List<String> getAltNames(@Nonnull final X509Certificate cert,
@Nonnull final Integer altNameType) {
log.debug("{} Extracting alt names from certificate of type: {}", getLogPrefix(), altNameType.toString());
final Integer[] nameTypes = new Integer[] {altNameType};
diff --git a/opensaml-spring/src/main/java/org/opensaml/spring/trust/StaticPKIXFactoryBean.java b/opensaml-spring/src/main/java/org/opensaml/spring/trust/StaticPKIXFactoryBean.java
index 4bb0bd5a1..15822c3d7 100644
--- a/opensaml-spring/src/main/java/org/opensaml/spring/trust/StaticPKIXFactoryBean.java
+++ b/opensaml-spring/src/main/java/org/opensaml/spring/trust/StaticPKIXFactoryBean.java
@@ -45,7 +45,8 @@ import org.slf4j.Logger;
import org.springframework.beans.FatalBeanException;
-import net.shibboleth.shared.annotation.constraint.NonnullElements;
+import net.shibboleth.shared.annotation.constraint.NotLive;
+import net.shibboleth.shared.annotation.constraint.Unmodifiable;
import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.primitive.LoggerFactory;
import net.shibboleth.shared.primitive.StringSupport;
@@ -151,9 +152,9 @@ public class StaticPKIXFactoryBean extends AbstractComponentAwareFactoryBean<PKI
*
* @since 3.4.0
*/
- public void setTrustedNames(@Nullable @NonnullElements final Collection<String> names) {
+ public void setTrustedNames(@Nullable final Collection<String> names) {
if (names != null) {
- trustedNames = Set.copyOf(names);
+ trustedNames = CollectionSupport.copyToSet(names);
} else {
trustedNames = null;
}
@@ -186,7 +187,7 @@ public class StaticPKIXFactoryBean extends AbstractComponentAwareFactoryBean<PKI
*
* @return the certificates
*/
- @Nonnull protected List<X509Certificate> getCertificates() {
+ @Nonnull @Unmodifiable @NotLive protected List<X509Certificate> getCertificates() {
if (certificateResources == null) {
return CollectionSupport.emptyList();
}
@@ -210,7 +211,7 @@ public class StaticPKIXFactoryBean extends AbstractComponentAwareFactoryBean<PKI
*
* @return the crls
*/
- @Nonnull protected List<X509CRL> getCRLs() {
+ @Nonnull @Unmodifiable @NotLive protected List<X509CRL> getCRLs() {
if (crlResources == null) {
return CollectionSupport.emptyList();
}
diff --git a/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageServiceStore.java b/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageServiceStore.java
index 6ad0b978f..14db725ec 100644
--- a/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageServiceStore.java
+++ b/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageServiceStore.java
@@ -27,7 +27,6 @@ import org.opensaml.storage.MutableStorageRecord;
import org.opensaml.storage.impl.client.ClientStorageService.ClientStorageSource;
import net.shibboleth.shared.annotation.constraint.Live;
-import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.NotEmpty;
/**
@@ -63,7 +62,7 @@ public interface ClientStorageServiceStore {
*
* @return map of contexts to manipulate
*/
- @Nonnull @NonnullElements @Live Map<String,Map<String,MutableStorageRecord<?>>> getContextMap();
+ @Nonnull @Live Map<String,Map<String,MutableStorageRecord<?>>> getContextMap();
/**
* Reconstitute stored data.
diff --git a/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/PopulateClientStorageSaveContext.java b/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/PopulateClientStorageSaveContext.java
index 7bd7e7c79..c508fd5d9 100644
--- a/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/PopulateClientStorageSaveContext.java
+++ b/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/PopulateClientStorageSaveContext.java
@@ -28,7 +28,6 @@ import org.opensaml.profile.action.ActionSupport;
import org.opensaml.profile.context.ProfileRequestContext;
import org.slf4j.Logger;
-import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.NotEmpty;
import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.primitive.LoggerFactory;
@@ -52,7 +51,7 @@ public class PopulateClientStorageSaveContext extends AbstractProfileAction {
@Nonnull private final Logger log = LoggerFactory.getLogger(PopulateClientStorageSaveContext.class);
/** The storage service instances to check for a save requirement. */
- @Nonnull @NonnullElements private Collection<ClientStorageService> storageServices;
+ @Nonnull private Collection<ClientStorageService> storageServices;
/** Constructor. */
public PopulateClientStorageSaveContext() {
diff --git a/opensaml-testing/src/main/java/org/opensaml/saml/saml2/testing/SAML2ActionTestingSupport.java b/opensaml-testing/src/main/java/org/opensaml/saml/saml2/testing/SAML2ActionTestingSupport.java
index 653c025bf..66b7b7fde 100644
--- a/opensaml-testing/src/main/java/org/opensaml/saml/saml2/testing/SAML2ActionTestingSupport.java
+++ b/opensaml-testing/src/main/java/org/opensaml/saml/saml2/testing/SAML2ActionTestingSupport.java
@@ -45,7 +45,6 @@ import org.opensaml.saml.saml2.core.Response;
import org.opensaml.saml.saml2.core.Scoping;
import org.opensaml.saml.saml2.core.Subject;
-import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.annotation.constraint.NotEmpty;
/**
@@ -325,8 +324,7 @@ public class SAML2ActionTestingSupport {
*
* @since 4.0.0
*/
- @Nonnull public static Scoping buildScoping(@Nullable final Integer count,
- @Nullable @NonnullElements Set<String> idplist) {
+ @Nonnull public static Scoping buildScoping(@Nullable final Integer count, @Nullable Set<String> idplist) {
final SAMLObjectBuilder<Scoping> scopingBuilder = (SAMLObjectBuilder<Scoping>)
XMLObjectProviderRegistrySupport.getBuilderFactory().<Scoping>ensureBuilder(
Scoping.DEFAULT_ELEMENT_NAME);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list