Skip to content

Commit d425fc7

Browse files
committed
Naming/PR feedback
1 parent 6130538 commit d425fc7

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/main/java/org/primeframework/mvc/action/config/ActionConfiguration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public class ActionConfiguration {
5050

5151
public final boolean allowUnknownParameters;
5252

53+
public final List<String> alternateMessageURIs;
54+
5355
public final Action annotation;
5456

5557
public final Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<>();
@@ -60,8 +62,6 @@ public class ActionConfiguration {
6062

6163
public final Map<HTTPMethod, ExecuteMethodConfiguration> executeMethods;
6264

63-
public final List<String> fallbackActionMessageURIs;
64-
6565
public final Map<String, FileUpload> fileUploadMembers;
6666

6767
public final List<Method> formPrepareMethods;
@@ -125,15 +125,15 @@ public ActionConfiguration(Class<?> actionClass,
125125
List<Method> preValidationMethods,
126126
Field unknownParametersField,
127127
Set<String> validContentTypes,
128-
List<String> fallbackActionMessageURIs) {
128+
List<String> alternateMessageURIs) {
129129
Objects.requireNonNull(actionClass);
130130

131131
this.actionClass = actionClass;
132132
this.allowUnknownParameters = allowUnknownParameters;
133133
this.constraintValidationMethods = constraintValidationMethods;
134134
this.formPrepareMethods = formPrepareMethods;
135135
this.authorizationMethods = authorizationMethods;
136-
this.fallbackActionMessageURIs = fallbackActionMessageURIs;
136+
this.alternateMessageURIs = alternateMessageURIs;
137137
this.jwtAuthorizationMethods = jwtAuthorizationMethods;
138138
this.preValidationMethods = preValidationMethods;
139139
this.postValidationMethods = postValidationMethods;

src/main/java/org/primeframework/mvc/message/l10n/ResourceBundleMessageProvider.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ protected String findMessage(ActionInvocation actionInvocation, String key) {
138138

139139
ActionConfiguration config = actionInvocation.configuration;
140140
if (config != null) {
141-
return config.fallbackActionMessageURIs.stream()
142-
.map(uri -> findMessage(uri, key))
143-
.filter(Objects::nonNull)
144-
.findFirst()
145-
.orElse(null);
141+
return config.alternateMessageURIs.stream()
142+
.map(uri -> findMessage(uri, key))
143+
.filter(Objects::nonNull)
144+
.findFirst()
145+
.orElse(null);
146146
}
147147

148148
return null;

src/test/web/messages/alternate-message-resources-annotated.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# either express or implied. See the License for the specific
1414
# language governing permissions and limitations under the License.
1515
#
16-
normal_message=normal_message
16+
normal_message=Normal message

src/test/web/messages/nested/nested-message.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# either express or implied. See the License for the specific
1414
# language governing permissions and limitations under the License.
1515
#
16-
nested_message=nested_message
16+
nested_message=Nested message

0 commit comments

Comments
 (0)