Fixed QualifierAnnotationAutowireCandidateResolver's detection of custom qualifier annotations
Issue: SPR-10107
This commit is contained in:
@@ -69,6 +69,21 @@ public abstract class StringUtils {
|
||||
// General convenience methods for working with Strings
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Check whether the given String is empty.
|
||||
* <p>This method accepts any Object as an argument, comparing it to
|
||||
* <code>null</code> and the empty String. As a consequence, this method
|
||||
* will never return <code>true</code> for a non-null non-String object.
|
||||
* <p>The Object signature is useful for general attribute handling code
|
||||
* that commonly deals with Strings but generally has to iterate over
|
||||
* Objects since attributes may e.g. be primitive value objects as well.
|
||||
* @param str the candidate String
|
||||
* @since 3.2.1
|
||||
*/
|
||||
public static boolean isEmpty(Object str) {
|
||||
return (str == null || "".equals(str));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that the given CharSequence is neither <code>null</code> nor of length 0.
|
||||
* Note: Will return <code>true</code> for a CharSequence that purely consists of whitespace.
|
||||
|
||||
Reference in New Issue
Block a user