diff --git a/web/src/main/java/org/springframework/security/web/access/expression/DefaultHttpSecurityExpressionHandler.java b/web/src/main/java/org/springframework/security/web/access/expression/DefaultHttpSecurityExpressionHandler.java index a75c0d2959..7a3b74c630 100644 --- a/web/src/main/java/org/springframework/security/web/access/expression/DefaultHttpSecurityExpressionHandler.java +++ b/web/src/main/java/org/springframework/security/web/access/expression/DefaultHttpSecurityExpressionHandler.java @@ -90,7 +90,7 @@ public class DefaultHttpSecurityExpressionHandler extends AbstractSecurityExpres * "ROLE_". */ public void setDefaultRolePrefix(String defaultRolePrefix) { - Assert.hasText(defaultRolePrefix, "defaultRolePrefix cannot be empty"); + Assert.notNull(defaultRolePrefix, "defaultRolePrefix cannot be null"); this.defaultRolePrefix = defaultRolePrefix; }