Update SecurityContextHolder.java
Use StringUtils.hasText
This commit is contained in:
parent
72d08a2a5f
commit
901a4e183a
|
@ -17,6 +17,7 @@
|
||||||
package org.springframework.security.core.context;
|
package org.springframework.security.core.context;
|
||||||
|
|
||||||
import org.springframework.util.ReflectionUtils;
|
import org.springframework.util.ReflectionUtils;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
|
|
||||||
|
@ -93,7 +94,7 @@ public class SecurityContextHolder {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void initialize() {
|
private static void initialize() {
|
||||||
if ((strategyName == null) || "".equals(strategyName)) {
|
if (!StringUtils.hasText(strategyName)) {
|
||||||
// Set default
|
// Set default
|
||||||
strategyName = MODE_THREADLOCAL;
|
strategyName = MODE_THREADLOCAL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue