[java-identity-provider] 38/51: IDP-1121 Remove Deprecated Constructors from RDBMS support classes

Rod Widdowson rdw at steadingsoftware.com
Wed Feb 6 08:43:09 EST 2019


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch master
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=d608957faee26bf64001aa6a842a5fa962dee3f3

commit d608957faee26bf64001aa6a842a5fa962dee3f3
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sun Jan 27 14:49:12 2019 +0000

    IDP-1121 Remove Deprecated Constructors from RDBMS support classes
    
    https://issues.shibboleth.net/jira/browse/IDP-1121
    
            DataSourceValidator and
            FormatExecutableStatementBuilder
---
 .../dc/rdbms/impl/DataSourceValidator.java         | 38 ----------------------
 .../impl/FormatExecutableStatementBuilder.java     | 27 ---------------
 2 files changed, 65 deletions(-)

diff --git a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/dc/rdbms/impl/DataSourceValidator.java b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/dc/rdbms/impl/DataSourceValidator.java
index b591f91..2562ce9 100644
--- a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/dc/rdbms/impl/DataSourceValidator.java
+++ b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/dc/rdbms/impl/DataSourceValidator.java
@@ -33,9 +33,6 @@ import net.shibboleth.utilities.java.support.component.AbstractInitializableComp
 import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 import net.shibboleth.utilities.java.support.component.ComponentSupport;
 import net.shibboleth.utilities.java.support.logic.Constraint;
-import net.shibboleth.utilities.java.support.logic.ConstraintViolationException;
-import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
-import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
 
 /**
  * Validator implementation that invokes {@link DataSource#getConnection()} to determine if the DataSource is properly
@@ -53,41 +50,6 @@ public class DataSourceValidator extends AbstractInitializableComponent implemen
     private boolean throwOnValidateError = true;
 
     /**
-     * Creates a new DataSource validator.
-     * 
-     * @param source to validate
-     * @deprecated - use the property setters
-     */
-    @Deprecated public DataSourceValidator(final DataSource source) {
-        DeprecationSupport.warn(ObjectType.METHOD, "DataSourceValidator(DataSource)", null, "DataSourceValidator()");
-        dataSource = source;
-        try {
-            initialize();
-        } catch (final ComponentInitializationException e) {
-            throw new ConstraintViolationException("Invalid parameterization.");
-        }
-    }
-
-    /**
-     * Creates a new DataSource validator.
-     * 
-     * @param source to validate
-     * @param throwOnError whether {@link #validate()} should throw or log errors
-     * @deprecated - use the property setters
-     */
-    @Deprecated public DataSourceValidator(final DataSource source, final boolean throwOnError) {
-        DeprecationSupport.warn(ObjectType.METHOD, "DataSourceValidator(DataSource, boolean)",
-                null, "DataSourceValidator()");
-        dataSource = source;
-        throwOnValidateError = throwOnError;
-        try {
-            initialize();
-        } catch (final ComponentInitializationException e) {
-            throw new ConstraintViolationException("Invalid parameterization.");
-        }
-    }
-    
-    /**
      * Constructor.
      *
      */
diff --git a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/dc/rdbms/impl/FormatExecutableStatementBuilder.java b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/dc/rdbms/impl/FormatExecutableStatementBuilder.java
index bdb2c17..55945f1 100644
--- a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/dc/rdbms/impl/FormatExecutableStatementBuilder.java
+++ b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/dc/rdbms/impl/FormatExecutableStatementBuilder.java
@@ -27,8 +27,6 @@ import net.shibboleth.idp.attribute.IdPAttributeValue;
 import net.shibboleth.idp.attribute.resolver.context.AttributeResolutionContext;
 import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 import net.shibboleth.utilities.java.support.logic.Constraint;
-import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
-import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
 
 /**
  * An {@link net.shibboleth.idp.attribute.resolver.dc.impl.ExecutableSearchBuilder}. It generates the SQL statement to
@@ -42,31 +40,6 @@ public class FormatExecutableStatementBuilder extends AbstractExecutableStatemen
 
     /**
      * Constructor.
-     * 
-     * @param query to search the database
-     * @deprecated - use the property setters
-     */
-    @Deprecated public FormatExecutableStatementBuilder(@Nonnull final String query) {
-        DeprecationSupport.warn(ObjectType.METHOD, "FormatExecutableStatementBuilder(String)", null, null);
-        sqlQuery = Constraint.isNotNull(query, "SQL query can not be null");
-    }
-
-    /**
-     * Constructor.
-     * 
-     * @param query to search the database
-     * @param timeout search timeout
-     * @deprecated - use the property setters
-     */
-    @Deprecated public FormatExecutableStatementBuilder(@Nonnull final String query, @Nonnull final int timeout) {
-        DeprecationSupport.warn(ObjectType.METHOD, "FormatExecutableStatementBuilder(String, int)", null, null);
-        sqlQuery = Constraint.isNotNull(query, "SQL query can not be null");
-        setQueryTimeout((int) Constraint.isGreaterThanOrEqual(0, timeout, "Query timeout must be greater than zero"));
-    }
-    
-    /**
-     * Constructor.
-     *
      */
     public FormatExecutableStatementBuilder() {
     }

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


More information about the commits mailing list