Remove Deprecation Warnings

- Address usage of new Integer
- Address missing deprecation markers

Closes gh-793
This commit is contained in:
Josh Cummings
2023-07-13 09:54:15 -06:00
parent b75f818415
commit 7fd89aa794
15 changed files with 51 additions and 29 deletions

View File

@@ -97,6 +97,7 @@ import org.springframework.util.StringUtils;
* @deprecated As of 2.0 it is recommended to use {@link javax.naming.ldap.LdapName} along
* with utility methods in {@link LdapUtils} instead.
*/
@Deprecated
public class DistinguishedName implements Name {
/**

View File

@@ -54,6 +54,7 @@ public class LdapEntryIdentification {
* {@link #LdapEntryIdentification(javax.naming.ldap.LdapName, javax.naming.ldap.LdapName)}
* instead.
*/
@Deprecated
public LdapEntryIdentification(DistinguishedName absoluteDn, DistinguishedName relativeDn) {
Assert.notNull(absoluteDn, "Absolute DN must not be null");
Assert.notNull(relativeDn, "Relative DN must not be null");
@@ -103,6 +104,7 @@ public class LdapEntryIdentification {
* @deprecated {@link DistinguishedName} and associated classes and methods are
* deprecated as of 2.0. use {@link #getRelativeName()} instead.
*/
@Deprecated
public DistinguishedName getRelativeDn() {
return new DistinguishedName(this.relativeDn);
}
@@ -114,6 +116,7 @@ public class LdapEntryIdentification {
* @deprecated {@link DistinguishedName} and associated classes and methods are
* deprecated as of 2.0. use {@link #getAbsoluteName()} instead.
*/
@Deprecated
public DistinguishedName getAbsoluteDn() {
return new DistinguishedName(this.absoluteDn);
}

View File

@@ -1178,6 +1178,7 @@ public interface LdapOperations {
* {@link #authenticate(org.springframework.ldap.query.LdapQuery, String)} or
* {@link #authenticate(org.springframework.ldap.query.LdapQuery, String, AuthenticatedLdapEntryContextMapper)}
*/
@Deprecated
boolean authenticate(Name base, String filter, String password);
/**
@@ -1203,6 +1204,7 @@ public interface LdapOperations {
* {@link #authenticate(org.springframework.ldap.query.LdapQuery, String)} or
* {@link #authenticate(org.springframework.ldap.query.LdapQuery, String, AuthenticatedLdapEntryContextMapper)}
*/
@Deprecated
boolean authenticate(String base, String filter, String password);
/**
@@ -1226,6 +1228,7 @@ public interface LdapOperations {
* {@link #authenticate(org.springframework.ldap.query.LdapQuery, String, AuthenticatedLdapEntryContextMapper)}
* @see #authenticate(Name, String, String)
*/
@Deprecated
boolean authenticate(Name base, String filter, String password, AuthenticatedLdapEntryContextCallback callback);
/**
@@ -1249,6 +1252,7 @@ public interface LdapOperations {
* {@link #authenticate(org.springframework.ldap.query.LdapQuery, String, AuthenticatedLdapEntryContextMapper)}
* @see #authenticate(String, String, String)
*/
@Deprecated
boolean authenticate(String base, String filter, String password, AuthenticatedLdapEntryContextCallback callback);
/**
@@ -1276,6 +1280,7 @@ public interface LdapOperations {
* {@link #authenticate(org.springframework.ldap.query.LdapQuery, String, AuthenticatedLdapEntryContextMapper)}
* @see #authenticate(Name, String, String, AuthenticatedLdapEntryContextCallback)
*/
@Deprecated
boolean authenticate(Name base, String filter, String password, AuthenticatedLdapEntryContextCallback callback,
AuthenticationErrorCallback errorCallback);
@@ -1304,6 +1309,7 @@ public interface LdapOperations {
* {@link #authenticate(org.springframework.ldap.query.LdapQuery, String, AuthenticatedLdapEntryContextMapper)}
* @see #authenticate(String, String, String, AuthenticatedLdapEntryContextCallback)
*/
@Deprecated
boolean authenticate(String base, String filter, String password, AuthenticatedLdapEntryContextCallback callback,
AuthenticationErrorCallback errorCallback);
@@ -1328,6 +1334,7 @@ public interface LdapOperations {
* @see #authenticate(Name, String, String, AuthenticatedLdapEntryContextCallback,
* AuthenticationErrorCallback)
*/
@Deprecated
boolean authenticate(Name base, String filter, String password, AuthenticationErrorCallback errorCallback);
/**
@@ -1350,6 +1357,7 @@ public interface LdapOperations {
* {@link #authenticate(org.springframework.ldap.query.LdapQuery, String)} or
* {@link #authenticate(org.springframework.ldap.query.LdapQuery, String, AuthenticatedLdapEntryContextMapper)}
*/
@Deprecated
boolean authenticate(String base, String filter, String password, AuthenticationErrorCallback errorCallback);
/**

View File

@@ -38,6 +38,7 @@ import org.springframework.util.ObjectUtils;
* @author Mattias Hellborg Arthursson
* @deprecated {@link DistinguishedName} and associated classes are deprecated as of 2.0.
*/
@Deprecated
public class LdapRdn implements Serializable, Comparable {
private static final long serialVersionUID = 5681397547245228750L;

View File

@@ -35,6 +35,7 @@ import org.springframework.util.StringUtils;
* @author Mattias Hellborg Arthursson
* @deprecated {@link DistinguishedName} and associated classes are deprecated as of 2.0.
*/
@Deprecated
public class LdapRdnComponent implements Comparable, Serializable {
private static final long serialVersionUID = -3296747972616243038L;
@@ -111,6 +112,7 @@ public class LdapRdnComponent implements Comparable, Serializable {
* @deprecated Using this method changes the internal state of surrounding
* DistinguishedName instance. This should be avoided.
*/
@Deprecated
public void setKey(String key) {
Assert.hasText(key, "Key must not be empty");
this.key = key;
@@ -130,6 +132,7 @@ public class LdapRdnComponent implements Comparable, Serializable {
* @deprecated Using this method changes the internal state of surrounding
* DistinguishedName instance. This should be avoided.
*/
@Deprecated
public void setValue(String value) {
Assert.hasText(value, "Value must not be empty");
this.value = value;

View File

@@ -38,6 +38,7 @@ public interface BaseLdapPathSource {
* @deprecated {@link DistinguishedName} and associated classes and methods are
* deprecated as of 2.0. Use {@link #getBaseLdapName()} instead.
*/
@Deprecated
DistinguishedName getBaseLdapPath();
/**

View File

@@ -38,6 +38,7 @@ import org.springframework.transaction.support.DefaultTransactionStatus;
* probably not such a good idea after all. AbstractPlatformTransactionManager is not
* designed for this usage.
*/
@Deprecated
public class ContextSourceAndDataSourceTransactionManager extends DataSourceTransactionManager {
private static final long serialVersionUID = 6832868697460384648L;

View File

@@ -41,6 +41,7 @@ import org.springframework.transaction.support.DefaultTransactionStatus;
* probably not such a good idea after all. AbstractPlatformTransactionManager is not
* designed for this usage.
*/
@Deprecated
public class ContextSourceAndHibernateTransactionManager extends HibernateTransactionManager {
/**