Update SecurityContextHolder.java

Use StringUtils.hasText
This commit is contained in:
stonio 2017-01-20 18:27:59 +01:00 committed by Rob Winch
parent 72d08a2a5f
commit 901a4e183a
1 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@
package org.springframework.security.core.context;
import org.springframework.util.ReflectionUtils;
import org.springframework.util.StringUtils;
import java.lang.reflect.Constructor;
@ -93,7 +94,7 @@ public class SecurityContextHolder {
}
private static void initialize() {
if ((strategyName == null) || "".equals(strategyName)) {
if (!StringUtils.hasText(strategyName)) {
// Set default
strategyName = MODE_THREADLOCAL;
}