[java-opensaml] branch main updated: Remove deprecated classes and point subclasses at new parents.

Scott Cantor cantor.2 at osu.edu
Mon Oct 10 19:36:29 UTC 2022


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=e0c9576de5c479a6a4ada64e1d8353ddb8a9e18b

The following commit(s) were added to refs/heads/main by this push:
     new e0c9576de Remove deprecated classes and point subclasses at new parents.
e0c9576de is described below

commit e0c9576de5c479a6a4ada64e1d8353ddb8a9e18b
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Oct 10 15:36:26 2022 -0400

    Remove deprecated classes and point subclasses at new parents.
---
 .../opensaml/xmlsec/DecryptionConfiguration.java   |   3 +-
 .../org/opensaml/xmlsec/DecryptionParameters.java  |   3 +-
 .../opensaml/xmlsec/EncryptionConfiguration.java   |   3 +-
 .../xmlsec/SignatureSigningConfiguration.java      |   3 +-
 .../xmlsec/SignatureValidationConfiguration.java   |   3 +-
 .../xmlsec/SignatureValidationParameters.java      |   3 +-
 .../xmlsec/WhitelistBlacklistConfiguration.java    |  84 ----------
 .../xmlsec/WhitelistBlacklistParameters.java       |  81 ---------
 .../xmlsec/impl/BasicDecryptionConfiguration.java  |   3 +-
 .../xmlsec/impl/BasicEncryptionConfiguration.java  |   3 +-
 .../impl/BasicSignatureSigningConfiguration.java   |   3 +-
 .../BasicSignatureValidationConfiguration.java     |   3 +-
 .../impl/BasicWhitelistBlacklistConfiguration.java | 183 ---------------------
 .../BasicWhitelistBlacklistConfigurationTest.java  | 142 ----------------
 14 files changed, 10 insertions(+), 510 deletions(-)

diff --git a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/DecryptionConfiguration.java b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/DecryptionConfiguration.java
index 26af52d9f..ffe3fed4e 100644
--- a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/DecryptionConfiguration.java
+++ b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/DecryptionConfiguration.java
@@ -25,8 +25,7 @@ import org.opensaml.xmlsec.keyinfo.KeyInfoCredentialResolver;
 /**
  * The configuration information to use when decrypting encrypted XML.
  */
- at SuppressWarnings("removal")
-public interface DecryptionConfiguration extends WhitelistBlacklistConfiguration {
+public interface DecryptionConfiguration extends AlgorithmPolicyConfiguration {
     
     /**
      * The KeyInfoCredentialResolver to use when processing the EncryptedData/KeyInfo.
diff --git a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/DecryptionParameters.java b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/DecryptionParameters.java
index 402a86d0d..9f759ed8e 100644
--- a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/DecryptionParameters.java
+++ b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/DecryptionParameters.java
@@ -25,8 +25,7 @@ import org.opensaml.xmlsec.keyinfo.KeyInfoCredentialResolver;
 /**
  * The effective parameters to use when decrypting encrypted XML.
  */
- at SuppressWarnings("removal")
-public class DecryptionParameters extends WhitelistBlacklistParameters {
+public class DecryptionParameters extends AlgorithmPolicyParameters {
     
     /** The EncryptedData's KeyInfo credential resolver. */
     @Nullable private KeyInfoCredentialResolver dataKeyInfoCredentialResolver;
diff --git a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/EncryptionConfiguration.java b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/EncryptionConfiguration.java
index 4bcfe80b9..c09815746 100644
--- a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/EncryptionConfiguration.java
+++ b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/EncryptionConfiguration.java
@@ -36,8 +36,7 @@ import net.shibboleth.shared.annotation.constraint.Unmodifiable;
 /**
  * The configuration information to use when generating encrypted XML.
  */
- at SuppressWarnings("removal")
-public interface EncryptionConfiguration extends WhitelistBlacklistConfiguration {
+public interface EncryptionConfiguration extends AlgorithmPolicyConfiguration {
     
     /**
      * Get the list of data encryption credentials to use, in preference order.
diff --git a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/SignatureSigningConfiguration.java b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/SignatureSigningConfiguration.java
index 2ca9a5d26..0f93b9cb9 100644
--- a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/SignatureSigningConfiguration.java
+++ b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/SignatureSigningConfiguration.java
@@ -33,8 +33,7 @@ import net.shibboleth.shared.annotation.constraint.Unmodifiable;
 /**
  * The configuration information to use when generating an XML signature.
  */
- at SuppressWarnings("removal")
-public interface SignatureSigningConfiguration extends WhitelistBlacklistConfiguration {
+public interface SignatureSigningConfiguration extends AlgorithmPolicyConfiguration {
     
     /**
      * Get the list of signing credentials to use when signing, in preference order.
diff --git a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/SignatureValidationConfiguration.java b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/SignatureValidationConfiguration.java
index 1f7f5daa0..4b5261091 100644
--- a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/SignatureValidationConfiguration.java
+++ b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/SignatureValidationConfiguration.java
@@ -24,8 +24,7 @@ import org.opensaml.xmlsec.signature.support.SignatureTrustEngine;
 /**
  * The configuration information to use when validating an XML signature.
  */
- at SuppressWarnings("removal")
-public interface SignatureValidationConfiguration extends WhitelistBlacklistConfiguration {
+public interface SignatureValidationConfiguration extends AlgorithmPolicyConfiguration {
     
     /**
      * Get the signature trust engine to use.
diff --git a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/SignatureValidationParameters.java b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/SignatureValidationParameters.java
index 40f79efd0..416293ac4 100644
--- a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/SignatureValidationParameters.java
+++ b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/SignatureValidationParameters.java
@@ -24,8 +24,7 @@ import org.opensaml.xmlsec.signature.support.SignatureTrustEngine;
 /**
  * The effective parameters to use when validating an XML signature.
  */
- at SuppressWarnings("removal")
-public class SignatureValidationParameters extends WhitelistBlacklistParameters {
+public class SignatureValidationParameters extends AlgorithmPolicyParameters {
     
     /** The signature trust engine to use. */
     @Nullable private SignatureTrustEngine signatureTrustEngine;
diff --git a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/WhitelistBlacklistConfiguration.java b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/WhitelistBlacklistConfiguration.java
deleted file mode 100644
index 0a7e25acf..000000000
--- a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/WhitelistBlacklistConfiguration.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements.  See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You under the Apache
- * License, Version 2.0 (the "License"); you may not use this file except in
- * compliance with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.opensaml.xmlsec;
-
-import java.util.Collection;
-
-import javax.annotation.Nonnull;
-
-import net.shibboleth.shared.annotation.constraint.NonnullElements;
-import net.shibboleth.shared.annotation.constraint.NotLive;
-import net.shibboleth.shared.annotation.constraint.Unmodifiable;
-
-/**
- * Algorithm URI include/exclude policy configuration.
- * 
- * <p>Replace with {@link AlgorithmPolicyConfiguration}.</p> 
- * 
- * @deprecated
- */
- at Deprecated(forRemoval=true, since="4.1.0")
-public interface WhitelistBlacklistConfiguration extends AlgorithmPolicyConfiguration {
-
-    /** Whitelist/blacklist precedence values. */
-    public enum Precedence {
-        /** Whitelist takes precedence over blacklist. */
-        WHITELIST,
-        
-        /** Blacklist takes precedence over whitelist. */
-        BLACKLIST
-    }
-
-    /**
-     * Get the list of whitelisted algorithm URIs.
-     * 
-     * @return the list of algorithms
-     */
-    @Nonnull @NonnullElements @Unmodifiable @NotLive Collection<String> getWhitelistedAlgorithms();
-    
-    /**
-     * Flag indicating whether to merge this configuration's whitelist with one of a lower order of precedence,
-     * or to treat this whitelist as authoritative.
-     * 
-     * @return true if should merge, false otherwise
-     */
-    boolean isWhitelistMerge();
-    
-    /**
-     * Get the list of blacklisted algorithm URIs.
-     * 
-     * @return the list of algorithms
-     */
-    @Nonnull @NonnullElements @Unmodifiable @NotLive Collection<String> getBlacklistedAlgorithms();
-    
-    /**
-     * Flag indicating whether to merge this configuration's blacklist with one of a lower order of precedence,
-     * or to treat this blacklist as authoritative.
-     * 
-     * @return true if should merge, false otherwise
-     */
-    boolean isBlacklistMerge();
-    
-    /**
-     * Get preference value indicating which should take precedence when both whitelist and blacklist are non-empty.
-     * 
-     * @return the configured precedence value.
-     */
-    @Nonnull Precedence getWhitelistBlacklistPrecedence();
-
-}
\ No newline at end of file
diff --git a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/WhitelistBlacklistParameters.java b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/WhitelistBlacklistParameters.java
deleted file mode 100644
index 6da9704f8..000000000
--- a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/WhitelistBlacklistParameters.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements.  See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You under the Apache
- * License, Version 2.0 (the "License"); you may not use this file except in
- * compliance with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.opensaml.xmlsec;
-
-import java.util.Collection;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-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.primitive.DeprecationSupport;
-import net.shibboleth.shared.primitive.DeprecationSupport.ObjectType;
-
-/**
- * The whitelist and blacklist algorithm parameters.
- * 
- * <p>Replace with {@link AlgorithmPolicyParameters}.
- * 
- * @deprecated
- */
- at Deprecated(forRemoval=true, since="4.1.0")
-public class WhitelistBlacklistParameters extends AlgorithmPolicyParameters {
-    
-    /**
-     * Get the list of whitelisted algorithm URI's.
-     * 
-     * @return the list of algorithms
-     */
-    @Nonnull @NonnullElements @NotLive @Unmodifiable public Collection<String> getWhitelistedAlgorithms() {
-        DeprecationSupport.warn(ObjectType.METHOD, "getWhitelistedAlgorithms", null, "getIncludedAlgorithms");
-        return getIncludedAlgorithms();
-    }
-    
-    /**
-     * Set the list of whitelisted algorithm URI's.
-     * 
-     * @param uris the list of algorithms
-     */
-    public void setWhitelistedAlgorithms(@Nullable final Collection<String> uris) {
-        DeprecationSupport.warn(ObjectType.METHOD, "setWhitelistedAlgorithms", null, "setIncludedAlgorithms");
-        setIncludedAlgorithms(uris);
-    }
-    
-    /**
-     * Get the list of blacklisted algorithm URI's.
-     * 
-     * @return the list of algorithms
-     */
-    @Nonnull @NonnullElements @NotLive @Unmodifiable public Collection<String> getBlacklistedAlgorithms() {
-        DeprecationSupport.warn(ObjectType.METHOD, "getBlacklistedAlgorithms", null, "getExcludedAlgorithms");
-        return getExcludedAlgorithms();
-    }
-    
-    /**
-     * Set the list of blacklisted algorithm URI's.
-     * 
-     * @param uris the list of algorithms
-     */
-    public void setBlacklistedAlgorithms(@Nonnull @NonnullElements final Collection<String> uris) {
-        DeprecationSupport.warn(ObjectType.METHOD, "setBlacklistedAlgorithms", null, "setExcludedAlgorithms");
-        setExcludedAlgorithms(uris);
-    }
-    
-}
\ No newline at end of file
diff --git a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicDecryptionConfiguration.java b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicDecryptionConfiguration.java
index 431427b63..de2bc276c 100644
--- a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicDecryptionConfiguration.java
+++ b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicDecryptionConfiguration.java
@@ -26,8 +26,7 @@ import org.opensaml.xmlsec.keyinfo.KeyInfoCredentialResolver;
 /**
  * Basic implementation of {@link DecryptionConfiguration}.
  */
- at SuppressWarnings("removal")
-public class BasicDecryptionConfiguration extends BasicWhitelistBlacklistConfiguration 
+public class BasicDecryptionConfiguration extends BasicAlgorithmPolicyConfiguration 
         implements DecryptionConfiguration {
     
     /** The EncryptedData's KeyInfo credential resolver. */
diff --git a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicEncryptionConfiguration.java b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicEncryptionConfiguration.java
index a9b042e9f..a01bdd909 100644
--- a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicEncryptionConfiguration.java
+++ b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicEncryptionConfiguration.java
@@ -42,8 +42,7 @@ import org.slf4j.LoggerFactory;
 /**
  * Basic implementation of {@link EncryptionConfiguration}.
  */
- at SuppressWarnings("removal")
-public class BasicEncryptionConfiguration extends BasicWhitelistBlacklistConfiguration 
+public class BasicEncryptionConfiguration extends BasicAlgorithmPolicyConfiguration 
         implements EncryptionConfiguration {
     
     /** Class logger. */
diff --git a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicSignatureSigningConfiguration.java b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicSignatureSigningConfiguration.java
index 50d0a3f76..9ab388c84 100644
--- a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicSignatureSigningConfiguration.java
+++ b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicSignatureSigningConfiguration.java
@@ -37,8 +37,7 @@ import org.slf4j.LoggerFactory;
 /**
  * Basic implementation of {@link SignatureSigningConfiguration}.
  */
- at SuppressWarnings("removal")
-public class BasicSignatureSigningConfiguration extends BasicWhitelistBlacklistConfiguration 
+public class BasicSignatureSigningConfiguration extends BasicAlgorithmPolicyConfiguration 
         implements SignatureSigningConfiguration {
     
     /** Class logger. */
diff --git a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicSignatureValidationConfiguration.java b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicSignatureValidationConfiguration.java
index 2e1ab2a8a..cef1f91f7 100644
--- a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicSignatureValidationConfiguration.java
+++ b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicSignatureValidationConfiguration.java
@@ -25,8 +25,7 @@ import org.opensaml.xmlsec.signature.support.SignatureTrustEngine;
 /**
  * Basic implementation of {@link SignatureValidationConfiguration}.
  */
- at SuppressWarnings("removal")
-public class BasicSignatureValidationConfiguration extends BasicWhitelistBlacklistConfiguration
+public class BasicSignatureValidationConfiguration extends BasicAlgorithmPolicyConfiguration
         implements SignatureValidationConfiguration {
     
     /** The signature trust engine to use. */
diff --git a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicWhitelistBlacklistConfiguration.java b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicWhitelistBlacklistConfiguration.java
deleted file mode 100644
index 88e515ba3..000000000
--- a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicWhitelistBlacklistConfiguration.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements.  See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You under the Apache
- * License, Version 2.0 (the "License"); you may not use this file except in
- * compliance with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.opensaml.xmlsec.impl;
-
-import java.util.Collection;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import org.opensaml.xmlsec.AlgorithmPolicyConfiguration;
-import org.opensaml.xmlsec.WhitelistBlacklistConfiguration;
-
-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.logic.Constraint;
-import net.shibboleth.shared.primitive.DeprecationSupport;
-import net.shibboleth.shared.primitive.DeprecationSupport.ObjectType;
-
-/**
- * Basic implementation of {@link WhitelistBlacklistConfiguration}.
- * 
- * <p>
- * The value returned by {@link WhitelistBlacklistConfiguration#getWhitelistBlacklistPrecedence()} defaults to
- * {@link org.opensaml.xmlsec.WhitelistBlacklistConfiguration.Precedence#WHITELIST}.
- * </p>
- * 
- * @deprecated
- */
- at Deprecated(forRemoval=true, since="4.1.0")
-public class BasicWhitelistBlacklistConfiguration extends BasicAlgorithmPolicyConfiguration
-        implements WhitelistBlacklistConfiguration {
-    
-    /**
-     * Flag indicating whether to merge this configuration's whitelist with one of a lower order of precedence,
-     * or to treat this whitelist as authoritative.
-     * 
-     * @return true if should merge, false otherwise
-     */
-    public boolean isWhitelistMerge() {
-        DeprecationSupport.warn(ObjectType.METHOD, "isWhitelistMerge", null, "isIncludeMerge");
-        return isIncludeMerge();
-    }
-    
-
-    /**
-     * Set the flag indicating whether to merge this configuration's whitelist with one of a lower order of precedence,
-     * or to treat this whitelist as authoritative.
-     * 
-     * <p>Defaults to: <code>false</code>
-     * 
-     * @param flag true if should merge, false otherwise
-     */
-    public void setWhitelistMerge(final boolean flag) {
-        DeprecationSupport.warn(ObjectType.METHOD, "setWhitelistMerge", null, "setIncludeMerge");
-        setIncludeMerge(flag);
-    }
-
-    /**
-     * Get the list of whitelisted algorithm URIs.
-     * 
-     * @return the list of algorithms
-     */
-    @Nonnull @NonnullElements @Unmodifiable @NotLive public Collection<String> getWhitelistedAlgorithms() {
-        DeprecationSupport.warn(ObjectType.METHOD, "getWhitelistedAlgorithms", null, "getIncludedAlgorithms");
-        return getIncludedAlgorithms();
-    }
-    
-
-    /**
-     * Set the list of whitelisted algorithm URIs.
-     * 
-     * @param uris the list of algorithms
-     */
-    public void setWhitelistedAlgorithms(@Nullable final Collection<String> uris) {
-        DeprecationSupport.warn(ObjectType.METHOD, "setWhitelistedAlgorithms", null, "setIncludedAlgorithms");
-        setIncludedAlgorithms(uris);
-    }
-
-    /**
-     * Flag indicating whether to merge this configuration's blacklist with one of a lower order of precedence,
-     * or to treat this blacklist as authoritative.
-     * 
-     * @return true if should merge, false otherwise
-     */
-    public boolean isBlacklistMerge() {
-        DeprecationSupport.warn(ObjectType.METHOD, "isBlacklistMerge", null, "isExcludeMerge");
-        return isExcludeMerge();
-    }
-    
-
-    /**
-     * Set the flag indicating whether to merge this configuration's blacklist with one of a lower order of precedence,
-     * or to treat this blacklist as authoritative.
-     * 
-     * <p>Defaults to: <code>true</code>
-     * 
-     * @param flag true if should merge, false otherwise
-     */
-    public void setBlacklistMerge(final boolean flag) {
-        DeprecationSupport.warn(ObjectType.METHOD, "setBlacklistMerge", null, "setExcludeMerge");
-        setExcludeMerge(flag);
-    }
-
-    /**
-     * Get the list of blacklisted algorithm URIs.
-     * 
-     * @return the list of algorithms
-     */
-    @Nonnull @NonnullElements @Unmodifiable @NotLive public Collection<String> getBlacklistedAlgorithms() {
-        DeprecationSupport.warn(ObjectType.METHOD, "getBlacklistedAlgorithms", null, "getExcludedAlgorithms");
-        return getExcludedAlgorithms();
-    }
-
-    /**
-     * Set the list of blacklisted algorithm URIs.
-     * 
-     * @param uris the list of algorithms
-     */
-    public void setBlacklistedAlgorithms(@Nullable final Collection<String> uris) {
-        DeprecationSupport.warn(ObjectType.METHOD, "setBlacklistedAlgorithms", null, "setExcludedAlgorithms");
-        setExcludedAlgorithms(uris);
-    }
-
-    /**
-     * Get preference value indicating which should take precedence when both whitelist and blacklist are non-empty.
-     * 
-     * @return the configured precedence value.
-     */
-    @Nonnull public WhitelistBlacklistConfiguration.Precedence getWhitelistBlacklistPrecedence() {
-        DeprecationSupport.warn(ObjectType.METHOD, "getWhitelistBlacklistPrecedence", null,
-                "getIncludeExcludePrecedence");
-        
-        switch (getIncludeExcludePrecedence()) {
-            case INCLUDE:
-                return WhitelistBlacklistConfiguration.Precedence.WHITELIST;
-            case EXCLUDE:
-                return WhitelistBlacklistConfiguration.Precedence.BLACKLIST;
-            default:
-                throw new IllegalArgumentException("Unrecognized Precedence value");
-        }
-    }
-    
-
-    /**
-     * Set preference value indicating which should take precedence when both whitelist and blacklist are non-empty.
-     * 
-     * @param value the precedence value
-     */
-    public void setWhitelistBlacklistPrecedence(@Nonnull final WhitelistBlacklistConfiguration.Precedence value) {
-        DeprecationSupport.warn(ObjectType.METHOD, "setWhitelistBlacklistPrecedence", null,
-                "setIncludeExcludePrecedence");
-        
-        switch(Constraint.isNotNull(value, "Precedence cannot be null")) {
-            case WHITELIST:
-                setIncludeExcludePrecedence(AlgorithmPolicyConfiguration.Precedence.INCLUDE);
-                break;
-                
-            case BLACKLIST:
-                setIncludeExcludePrecedence(AlgorithmPolicyConfiguration.Precedence.EXCLUDE);
-                break;
-                    
-            default:
-                throw new IllegalArgumentException("Unrecognized precedence value");
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/impl/BasicWhitelistBlacklistConfigurationTest.java b/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/impl/BasicWhitelistBlacklistConfigurationTest.java
deleted file mode 100644
index d261c4abb..000000000
--- a/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/impl/BasicWhitelistBlacklistConfigurationTest.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements.  See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You under the Apache
- * License, Version 2.0 (the "License"); you may not use this file except in
- * compliance with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.opensaml.xmlsec.impl;
-
-import static org.testng.Assert.*;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.opensaml.xmlsec.WhitelistBlacklistConfiguration.Precedence;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import net.shibboleth.shared.logic.ConstraintViolationException;
-
- at SuppressWarnings("removal")
-public class BasicWhitelistBlacklistConfigurationTest {
-    
-    private BasicWhitelistBlacklistConfiguration config;
-    
-    @BeforeMethod
-    public void setUp() {
-        config = new BasicWhitelistBlacklistConfiguration();
-    }
-    
-    @Test
-    public void testDefaults() {
-        assertEquals(config.isWhitelistMerge(), false);
-        assertNotNull(config.getWhitelistedAlgorithms());
-        assertTrue(config.getWhitelistedAlgorithms().isEmpty());
-        
-        assertEquals(config.isBlacklistMerge(), true);
-        assertNotNull(config.getBlacklistedAlgorithms());
-        assertTrue(config.getBlacklistedAlgorithms().isEmpty());
-        
-        assertEquals(config.getWhitelistBlacklistPrecedence(), Precedence.WHITELIST);
-    }
-    
-    @Test
-    public void testValidWhitelist() {
-        config.setWhitelistedAlgorithms(Arrays.asList("  A   ", null, "   B   ", null, "   C   "));
-        
-        assertEquals(config.getWhitelistedAlgorithms().size(), 3);
-        assertTrue(config.getWhitelistedAlgorithms().contains("A"));
-        assertTrue(config.getWhitelistedAlgorithms().contains("B"));
-        assertTrue(config.getWhitelistedAlgorithms().contains("C"));
-    }
-
-    @Test
-    public void testNullWhitelist() {
-        config.setWhitelistedAlgorithms(null);
-        assertNotNull(config.getWhitelistedAlgorithms());
-        assertTrue(config.getWhitelistedAlgorithms().isEmpty());
-    }
-
-    @Test(expectedExceptions=UnsupportedOperationException.class)
-    public void testWhitelistImmutable() {
-        config.setWhitelistedAlgorithms(List.of("A", "B", "C"));
-        config.getWhitelistedAlgorithms().add("D");
-    }
-
-    @Test
-    public void testWhitelistMerge() {
-        // Test default
-        assertFalse(config.isWhitelistMerge());
-        
-        config.setWhitelistMerge(true);
-        assertTrue(config.isWhitelistMerge());
-        
-        config.setWhitelistMerge(false);
-        assertFalse(config.isWhitelistMerge());
-    }
-
-    @Test
-    public void testValidBlacklist() {
-        config.setBlacklistedAlgorithms(Arrays.asList("   A   ", null, "   B   ", null, "   C   "));
-        
-        assertEquals(config.getBlacklistedAlgorithms().size(), 3);
-        assertTrue(config.getBlacklistedAlgorithms().contains("A"));
-        assertTrue(config.getBlacklistedAlgorithms().contains("B"));
-        assertTrue(config.getBlacklistedAlgorithms().contains("C"));
-    }
-    
-    @Test
-    public void testNullBlacklist() {
-        config.setBlacklistedAlgorithms(null);
-        assertNotNull(config.getBlacklistedAlgorithms());
-        assertTrue(config.getBlacklistedAlgorithms().isEmpty());
-    }
-    
-    @Test(expectedExceptions=UnsupportedOperationException.class)
-    public void testBlacklistImmutable() {
-        config.setBlacklistedAlgorithms(List.of("A", "B", "C"));
-        config.getBlacklistedAlgorithms().add("D");
-    }
-    
-    @Test
-    public void testBlacklistMerge() {
-        // Test default
-        assertTrue(config.isBlacklistMerge());
-        
-        config.setBlacklistMerge(false);
-        assertFalse(config.isBlacklistMerge());
-        
-        config.setBlacklistMerge(true);
-        assertTrue(config.isBlacklistMerge());
-    }
-
-    @Test
-    public void testValidPrecedence() {
-        // Test default
-        assertEquals(config.getWhitelistBlacklistPrecedence(), Precedence.WHITELIST);
-        
-        config.setWhitelistBlacklistPrecedence(Precedence.WHITELIST);
-        assertEquals(config.getWhitelistBlacklistPrecedence(), Precedence.WHITELIST);
-        
-        config.setWhitelistBlacklistPrecedence(Precedence.BLACKLIST);
-        assertEquals(config.getWhitelistBlacklistPrecedence(), Precedence.BLACKLIST);
-    }
-    
-    @Test(expectedExceptions=ConstraintViolationException.class)
-    public void testNullPrecedence() {
-        config.setWhitelistBlacklistPrecedence(null);
-    }
-    
-}

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


More information about the commits mailing list