Skip to content

Commit 5ca64c1

Browse files
committed
Polish Error Messages
- aligned the grammar - formatted using gradlew format - updated copyright year Issue gh-16193
1 parent 784c02a commit 5ca64c1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

config/src/main/java/org/springframework/security/config/http/AuthorizationFilterParser.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -76,12 +76,13 @@ class AuthorizationFilterParser implements BeanDefinitionParser {
7676
public BeanDefinition parse(Element element, ParserContext parserContext) {
7777
if (!isUseExpressions(element)) {
7878
parserContext.getReaderContext()
79-
.error("AuthorizationManager must be used with `use-expressions=\"true\"; Add `use-authorization-manager=\"false\"` or enable use of expressions in `<http>` block", element);
79+
.error("AuthorizationManager must be used with `use-expressions=\"true\"; either add `use-authorization-manager=\"false\"` or `use-expressions=`\"false\"` in your `<http>` block",
80+
element);
8081
return null;
8182
}
8283
if (StringUtils.hasText(element.getAttribute(ATT_ACCESS_DECISION_MANAGER_REF))) {
8384
parserContext.getReaderContext()
84-
.error("AuthorizationManager cannot be used in conjunction with `access-decision-manager-ref`; either remove the reference to AccessDecisionManager or add `use-authorization-manager=\"false\"` to `<http>` block",
85+
.error("AuthorizationManager cannot be used in conjunction with `access-decision-manager-ref`; either remove the reference to AccessDecisionManager or add `use-authorization-manager=\"false\"` to your `<http>` block",
8586
element);
8687
return null;
8788
}

0 commit comments

Comments
 (0)