Polishing deprecated methods
Added since and forRemoval to Deprecated methods.
This commit is contained in:
@@ -708,7 +708,7 @@ public class MimeType implements Comparable<MimeType>, Serializable {
|
||||
* @param <T> the type of mime types that may be compared by this comparator
|
||||
* @deprecated As of 6.0, with no direct replacement
|
||||
*/
|
||||
@Deprecated(since = "6.0")
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
public static class SpecificityComparator<T extends MimeType> implements Comparator<T> {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -55,7 +55,8 @@ public abstract class MimeTypeUtils {
|
||||
* Comparator formally used by {@link #sortBySpecificity(List)}.
|
||||
* @deprecated As of 6.0, with no direct replacement
|
||||
*/
|
||||
@Deprecated(since = "6.0")
|
||||
@SuppressWarnings("removal")
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
public static final Comparator<MimeType> SPECIFICITY_COMPARATOR = new MimeType.SpecificityComparator<>();
|
||||
|
||||
/**
|
||||
|
||||
@@ -221,9 +221,9 @@ public abstract class StringUtils {
|
||||
* @param str the {@code String} to check
|
||||
* @return the trimmed {@code String}
|
||||
* @see java.lang.Character#isWhitespace
|
||||
* @deprecated in favor of {@link String#strip()}
|
||||
* @deprecated since 6.0, in favor of {@link String#strip()}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public static String trimWhitespace(String str) {
|
||||
if (!hasLength(str)) {
|
||||
return str;
|
||||
@@ -277,9 +277,9 @@ public abstract class StringUtils {
|
||||
* @param str the {@code String} to check
|
||||
* @return the trimmed {@code String}
|
||||
* @see java.lang.Character#isWhitespace
|
||||
* @deprecated in favor of {@link String#stripLeading()}
|
||||
* @deprecated since 6.0, in favor of {@link String#stripLeading()}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public static String trimLeadingWhitespace(String str) {
|
||||
if (!hasLength(str)) {
|
||||
return str;
|
||||
@@ -293,9 +293,9 @@ public abstract class StringUtils {
|
||||
* @param str the {@code String} to check
|
||||
* @return the trimmed {@code String}
|
||||
* @see java.lang.Character#isWhitespace
|
||||
* @deprecated in favor of {@link String#stripTrailing()}
|
||||
* @deprecated since 6.0, in favor of {@link String#stripTrailing()}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public static String trimTrailingWhitespace(String str) {
|
||||
if (!hasLength(str)) {
|
||||
return str;
|
||||
|
||||
@@ -98,7 +98,7 @@ class StringUtilsTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Deprecated
|
||||
@SuppressWarnings("deprecation")
|
||||
void trimLeadingWhitespace() {
|
||||
assertThat(StringUtils.trimLeadingWhitespace(null)).isNull();
|
||||
assertThat(StringUtils.trimLeadingWhitespace("")).isEqualTo("");
|
||||
@@ -114,7 +114,7 @@ class StringUtilsTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Deprecated
|
||||
@SuppressWarnings("deprecation")
|
||||
void trimTrailingWhitespace() {
|
||||
assertThat(StringUtils.trimTrailingWhitespace(null)).isNull();
|
||||
assertThat(StringUtils.trimTrailingWhitespace("")).isEqualTo("");
|
||||
|
||||
Reference in New Issue
Block a user